Documentation ¶
Index ¶
- Variables
- func ConfigAddOptions(prefix string, f *flag.FlagSet)
- func CreateFallbackClient(fallbackClientUrl string, fallbackClientTimeout time.Duration) (types.FallbackClient, error)
- func EstimateGas(ctx context.Context, b ethapi.Backend, args TransactionArgs, ...) (hexutil.Uint64, error)
- func NewRevertReason(result *core.ExecutionResult) error
- type APIBackend
- func (a *APIBackend) AccountManager() *accounts.Manager
- func (a *APIBackend) BlockByHash(ctx context.Context, hash common.Hash) (*types.Block, error)
- func (a *APIBackend) BlockByNumber(ctx context.Context, number rpc.BlockNumber) (*types.Block, error)
- func (a *APIBackend) BlockByNumberOrHash(ctx context.Context, blockNrOrHash rpc.BlockNumberOrHash) (*types.Block, error)
- func (a *APIBackend) BloomStatus() (uint64, uint64)
- func (a *APIBackend) ChainConfig() *params.ChainConfig
- func (a *APIBackend) ChainDb() ethdb.Database
- func (a *APIBackend) CurrentBlock() *types.Block
- func (a *APIBackend) CurrentHeader() *types.Header
- func (a *APIBackend) Engine() consensus.Engine
- func (a *APIBackend) ExtRPCEnabled() bool
- func (b *APIBackend) FallbackClient() types.FallbackClient
- func (a *APIBackend) FeeHistory(ctx context.Context, blocks int, newestBlock rpc.BlockNumber, ...) (*big.Int, [][]*big.Int, []*big.Int, []float64, error)
- func (a *APIBackend) GetAPIs(filterSystem *filters.FilterSystem) []rpc.API
- func (a *APIBackend) GetArbitrumNode() interface{}
- func (a *APIBackend) GetEVM(ctx context.Context, msg core.Message, state *state.StateDB, ...) (*vm.EVM, func() error, error)
- func (a *APIBackend) GetLogs(ctx context.Context, hash common.Hash, number uint64) ([][]*types.Log, error)
- func (a *APIBackend) GetPoolNonce(ctx context.Context, addr common.Address) (uint64, error)
- func (a *APIBackend) GetPoolTransaction(txHash common.Hash) *types.Transaction
- func (a *APIBackend) GetPoolTransactions() (types.Transactions, error)
- func (a *APIBackend) GetReceipts(ctx context.Context, hash common.Hash) (types.Receipts, error)
- func (a *APIBackend) GetTd(ctx context.Context, hash common.Hash) *big.Int
- func (a *APIBackend) GetTransaction(ctx context.Context, txHash common.Hash) (*types.Transaction, common.Hash, uint64, uint64, error)
- func (a *APIBackend) HeaderByHash(ctx context.Context, hash common.Hash) (*types.Header, error)
- func (a *APIBackend) HeaderByNumber(ctx context.Context, number rpc.BlockNumber) (*types.Header, error)
- func (a *APIBackend) HeaderByNumberOrHash(ctx context.Context, blockNrOrHash rpc.BlockNumberOrHash) (*types.Header, error)
- func (b *APIBackend) PendingBlockAndReceipts() (*types.Block, types.Receipts)
- func (a *APIBackend) RPCEVMTimeout() time.Duration
- func (a *APIBackend) RPCGasCap() uint64
- func (a *APIBackend) RPCTxFeeCap() float64
- func (a *APIBackend) SendTx(ctx context.Context, signedTx *types.Transaction) error
- func (a *APIBackend) ServiceFilter(ctx context.Context, session *bloombits.MatcherSession)
- func (a *APIBackend) SetHead(number uint64)
- func (a *APIBackend) StateAndHeaderByNumber(ctx context.Context, number rpc.BlockNumber) (*state.StateDB, *types.Header, error)
- func (a *APIBackend) StateAndHeaderByNumberOrHash(ctx context.Context, blockNrOrHash rpc.BlockNumberOrHash) (*state.StateDB, *types.Header, error)
- func (a *APIBackend) StateAtBlock(ctx context.Context, block *types.Block, reexec uint64, base *state.StateDB, ...) (statedb *state.StateDB, err error)
- func (a *APIBackend) StateAtTransaction(ctx context.Context, block *types.Block, txIndex int, reexec uint64) (core.Message, vm.BlockContext, *state.StateDB, error)
- func (a *APIBackend) Stats() (pending int, queued int)
- func (a *APIBackend) SubscribeChainEvent(ch chan<- core.ChainEvent) event.Subscription
- func (a *APIBackend) SubscribeChainHeadEvent(ch chan<- core.ChainHeadEvent) event.Subscription
- func (a *APIBackend) SubscribeChainSideEvent(ch chan<- core.ChainSideEvent) event.Subscription
- func (a *APIBackend) SubscribeLogsEvent(ch chan<- []*types.Log) event.Subscription
- func (a *APIBackend) SubscribeNewTxsEvent(ch chan<- core.NewTxsEvent) event.Subscription
- func (a *APIBackend) SubscribePendingLogsEvent(ch chan<- []*types.Log) event.Subscription
- func (a *APIBackend) SubscribeRemovedLogsEvent(ch chan<- core.RemovedLogsEvent) event.Subscription
- func (a *APIBackend) SuggestGasTipCap(ctx context.Context) (*big.Int, error)
- func (a *APIBackend) SyncProgress() ethereum.SyncProgress
- func (a *APIBackend) SyncProgressMap() map[string]interface{}
- func (a *APIBackend) TxPoolContent() (map[common.Address]types.Transactions, map[common.Address]types.Transactions)
- func (a *APIBackend) TxPoolContentFrom(addr common.Address) (types.Transactions, types.Transactions)
- func (a *APIBackend) UnprotectedAllowed() bool
- type ArbDebugConfig
- type ArbInterface
- type Backend
- func (b *Backend) APIBackend() *APIBackend
- func (b *Backend) ArbInterface() ArbInterface
- func (b *Backend) ChainDb() ethdb.Database
- func (b *Backend) EnqueueL2Message(ctx context.Context, tx *types.Transaction) error
- func (b *Backend) Stack() *node.Node
- func (b *Backend) Start() error
- func (b *Backend) Stop() error
- func (b *Backend) SubscribeNewTxsEvent(ch chan<- core.NewTxsEvent) event.Subscription
- type Config
- type PublicNetAPI
- type PublicTxPoolAPI
- type RecordingChainContext
- type RecordingDatabase
- func (r *RecordingDatabase) Dereference(header *types.Header)
- func (r *RecordingDatabase) GetOrRecreateState(ctx context.Context, header *types.Header, logFunc StateBuildingLogFunction) (*state.StateDB, error)
- func (r *RecordingDatabase) PreimagesFromRecording(chainContextIf core.ChainContext, recordingDb *RecordingKV) (map[common.Hash][]byte, error)
- func (r *RecordingDatabase) PrepareRecording(ctx context.Context, lastBlockHeader *types.Header, ...) (*state.StateDB, core.ChainContext, *RecordingKV, error)
- func (r *RecordingDatabase) ReferenceCount() int64
- func (r *RecordingDatabase) StateFor(header *types.Header) (*state.StateDB, error)
- func (r *RecordingDatabase) WriteStateToDatabase(header *types.Header) error
- type RecordingKV
- func (db *RecordingKV) Close() error
- func (db *RecordingKV) Compact(start []byte, limit []byte) error
- func (db *RecordingKV) Delete(key []byte) error
- func (db *RecordingKV) EnableBypass()
- func (db *RecordingKV) Get(key []byte) ([]byte, error)
- func (db *RecordingKV) GetRecordedEntries() map[common.Hash][]byte
- func (db *RecordingKV) Has(key []byte) (bool, error)
- func (db *RecordingKV) NewBatch() ethdb.Batch
- func (db *RecordingKV) NewBatchWithSize(size int) ethdb.Batch
- func (db *RecordingKV) NewIterator(prefix []byte, start []byte) ethdb.Iterator
- func (db *RecordingKV) NewSnapshot() (ethdb.Snapshot, error)
- func (db *RecordingKV) Put(key []byte, value []byte) error
- func (db *RecordingKV) Release()
- func (db *RecordingKV) Stat(property string) (string, error)
- type StateBuildingLogFunction
- type SyncProgressBackend
- type TransactionArgs
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultConfig = Config{ RPCGasCap: ethconfig.Defaults.RPCGasCap, RPCTxFeeCap: ethconfig.Defaults.RPCTxFeeCap, RPCEVMTimeout: ethconfig.Defaults.RPCEVMTimeout, BloomBitsBlocks: params.BloomBitsBlocks * 4, BloomConfirms: params.BloomConfirms, FilterLogCacheSize: 32, FilterTimeout: 5 * time.Minute, FeeHistoryMaxBlockCount: 1024, ClassicRedirect: "", ArbDebug: ArbDebugConfig{ BlockRangeBound: 256, TimeoutQueueBound: 512, }, }
Functions ¶
func ConfigAddOptions ¶
func CreateFallbackClient ¶
func EstimateGas ¶
func NewRevertReason ¶
func NewRevertReason(result *core.ExecutionResult) error
Types ¶
type APIBackend ¶
type APIBackend struct {
// contains filtered or unexported fields
}
func (*APIBackend) AccountManager ¶
func (a *APIBackend) AccountManager() *accounts.Manager
func (*APIBackend) BlockByHash ¶
func (*APIBackend) BlockByNumber ¶
func (a *APIBackend) BlockByNumber(ctx context.Context, number rpc.BlockNumber) (*types.Block, error)
func (*APIBackend) BlockByNumberOrHash ¶
func (a *APIBackend) BlockByNumberOrHash(ctx context.Context, blockNrOrHash rpc.BlockNumberOrHash) (*types.Block, error)
func (*APIBackend) ChainConfig ¶
func (a *APIBackend) ChainConfig() *params.ChainConfig
func (*APIBackend) ChainDb ¶
func (a *APIBackend) ChainDb() ethdb.Database
func (*APIBackend) CurrentBlock ¶
func (a *APIBackend) CurrentBlock() *types.Block
func (*APIBackend) CurrentHeader ¶
func (a *APIBackend) CurrentHeader() *types.Header
func (*APIBackend) Engine ¶
func (a *APIBackend) Engine() consensus.Engine
func (*APIBackend) ExtRPCEnabled ¶
func (a *APIBackend) ExtRPCEnabled() bool
func (*APIBackend) FallbackClient ¶
func (b *APIBackend) FallbackClient() types.FallbackClient
func (*APIBackend) FeeHistory ¶
func (*APIBackend) GetAPIs ¶
func (a *APIBackend) GetAPIs(filterSystem *filters.FilterSystem) []rpc.API
func (*APIBackend) GetArbitrumNode ¶
func (a *APIBackend) GetArbitrumNode() interface{}
func (*APIBackend) GetPoolNonce ¶
func (*APIBackend) GetPoolTransaction ¶
func (a *APIBackend) GetPoolTransaction(txHash common.Hash) *types.Transaction
func (*APIBackend) GetPoolTransactions ¶
func (a *APIBackend) GetPoolTransactions() (types.Transactions, error)
func (*APIBackend) GetReceipts ¶
func (*APIBackend) GetTransaction ¶
func (*APIBackend) HeaderByHash ¶
func (*APIBackend) HeaderByNumber ¶
func (a *APIBackend) HeaderByNumber(ctx context.Context, number rpc.BlockNumber) (*types.Header, error)
func (*APIBackend) HeaderByNumberOrHash ¶
func (a *APIBackend) HeaderByNumberOrHash(ctx context.Context, blockNrOrHash rpc.BlockNumberOrHash) (*types.Header, error)
func (*APIBackend) PendingBlockAndReceipts ¶
func (b *APIBackend) PendingBlockAndReceipts() (*types.Block, types.Receipts)
func (*APIBackend) RPCEVMTimeout ¶
func (a *APIBackend) RPCEVMTimeout() time.Duration
func (*APIBackend) RPCGasCap ¶
func (a *APIBackend) RPCGasCap() uint64
func (*APIBackend) RPCTxFeeCap ¶
func (a *APIBackend) RPCTxFeeCap() float64
func (*APIBackend) SendTx ¶
func (a *APIBackend) SendTx(ctx context.Context, signedTx *types.Transaction) error
Transaction pool API
func (*APIBackend) ServiceFilter ¶
func (a *APIBackend) ServiceFilter(ctx context.Context, session *bloombits.MatcherSession)
func (*APIBackend) StateAndHeaderByNumber ¶
func (a *APIBackend) StateAndHeaderByNumber(ctx context.Context, number rpc.BlockNumber) (*state.StateDB, *types.Header, error)
func (*APIBackend) StateAndHeaderByNumberOrHash ¶
func (a *APIBackend) StateAndHeaderByNumberOrHash(ctx context.Context, blockNrOrHash rpc.BlockNumberOrHash) (*state.StateDB, *types.Header, error)
func (*APIBackend) StateAtBlock ¶
func (*APIBackend) StateAtTransaction ¶
func (*APIBackend) Stats ¶
func (a *APIBackend) Stats() (pending int, queued int)
func (*APIBackend) SubscribeChainEvent ¶
func (a *APIBackend) SubscribeChainEvent(ch chan<- core.ChainEvent) event.Subscription
func (*APIBackend) SubscribeChainHeadEvent ¶
func (a *APIBackend) SubscribeChainHeadEvent(ch chan<- core.ChainHeadEvent) event.Subscription
func (*APIBackend) SubscribeChainSideEvent ¶
func (a *APIBackend) SubscribeChainSideEvent(ch chan<- core.ChainSideEvent) event.Subscription
func (*APIBackend) SubscribeLogsEvent ¶
func (a *APIBackend) SubscribeLogsEvent(ch chan<- []*types.Log) event.Subscription
func (*APIBackend) SubscribeNewTxsEvent ¶
func (a *APIBackend) SubscribeNewTxsEvent(ch chan<- core.NewTxsEvent) event.Subscription
func (*APIBackend) SubscribePendingLogsEvent ¶
func (a *APIBackend) SubscribePendingLogsEvent(ch chan<- []*types.Log) event.Subscription
func (*APIBackend) SubscribeRemovedLogsEvent ¶
func (a *APIBackend) SubscribeRemovedLogsEvent(ch chan<- core.RemovedLogsEvent) event.Subscription
func (*APIBackend) SuggestGasTipCap ¶
func (*APIBackend) SyncProgress ¶
func (a *APIBackend) SyncProgress() ethereum.SyncProgress
func (*APIBackend) SyncProgressMap ¶
func (a *APIBackend) SyncProgressMap() map[string]interface{}
General Ethereum API
func (*APIBackend) TxPoolContent ¶
func (a *APIBackend) TxPoolContent() (map[common.Address]types.Transactions, map[common.Address]types.Transactions)
func (*APIBackend) TxPoolContentFrom ¶
func (a *APIBackend) TxPoolContentFrom(addr common.Address) (types.Transactions, types.Transactions)
func (*APIBackend) UnprotectedAllowed ¶
func (a *APIBackend) UnprotectedAllowed() bool
type ArbDebugConfig ¶
type ArbInterface ¶
type ArbInterface interface { PublishTransaction(ctx context.Context, tx *types.Transaction) error BlockChain() *core.BlockChain ArbNode() interface{} }
type Backend ¶
type Backend struct {
// contains filtered or unexported fields
}
func NewBackend ¶
func NewBackend(stack *node.Node, config *Config, chainDb ethdb.Database, publisher ArbInterface, sync SyncProgressBackend, filterConfig filters.Config) (*Backend, *filters.FilterSystem, error)
func (*Backend) APIBackend ¶
func (b *Backend) APIBackend() *APIBackend
func (*Backend) ArbInterface ¶
func (b *Backend) ArbInterface() ArbInterface
func (*Backend) EnqueueL2Message ¶
func (*Backend) SubscribeNewTxsEvent ¶
func (b *Backend) SubscribeNewTxsEvent(ch chan<- core.NewTxsEvent) event.Subscription
type Config ¶
type Config struct { // RPCGasCap is the global gas cap for eth-call variants. RPCGasCap uint64 `koanf:"gas-cap"` // RPCTxFeeCap is the global transaction fee(price * gaslimit) cap for // send-transction variants. The unit is ether. RPCTxFeeCap float64 `koanf:"tx-fee-cap"` // RPCEVMTimeout is the global timeout for eth-call. RPCEVMTimeout time.Duration `koanf:"evm-timeout"` // Parameters for the bloom indexer BloomBitsBlocks uint64 `koanf:"bloom-bits-blocks"` BloomConfirms uint64 `koanf:"bloom-confirms"` // Parameters for the filter system FilterLogCacheSize int `koanf:"filter-log-cache-size"` FilterTimeout time.Duration `koanf:"filter-timeout"` // FeeHistoryMaxBlockCount limits the number of historical blocks a fee history request may cover FeeHistoryMaxBlockCount uint64 `koanf:"feehistory-max-block-count"` ArbDebug ArbDebugConfig `koanf:"arbdebug"` ClassicRedirect string `koanf:"classic-redirect"` ClassicRedirectTimeout time.Duration `koanf:"classic-redirect-timeout"` }
type PublicNetAPI ¶
type PublicNetAPI struct {
// contains filtered or unexported fields
}
PublicNetAPI offers network related RPC methods
func NewPublicNetAPI ¶
func NewPublicNetAPI(networkVersion uint64) *PublicNetAPI
NewPublicNetAPI creates a new net API instance.
func (*PublicNetAPI) Version ¶
func (s *PublicNetAPI) Version() string
Version returns the current ethereum protocol version.
type PublicTxPoolAPI ¶
type PublicTxPoolAPI struct{}
PublicNetAPI offers network related RPC methods
func NewPublicTxPoolAPI ¶
func NewPublicTxPoolAPI() *PublicTxPoolAPI
NewPublicNetAPI creates a new net API instance.
type RecordingChainContext ¶
type RecordingChainContext struct {
// contains filtered or unexported fields
}
func (*RecordingChainContext) Engine ¶
func (r *RecordingChainContext) Engine() consensus.Engine
func (*RecordingChainContext) GetMinBlockNumberAccessed ¶
func (r *RecordingChainContext) GetMinBlockNumberAccessed() uint64
type RecordingDatabase ¶
type RecordingDatabase struct {
// contains filtered or unexported fields
}
func NewRecordingDatabase ¶
func NewRecordingDatabase(ethdb ethdb.Database, blockchain *core.BlockChain) *RecordingDatabase
func (*RecordingDatabase) Dereference ¶
func (r *RecordingDatabase) Dereference(header *types.Header)
func (*RecordingDatabase) GetOrRecreateState ¶
func (r *RecordingDatabase) GetOrRecreateState(ctx context.Context, header *types.Header, logFunc StateBuildingLogFunction) (*state.StateDB, error)
func (*RecordingDatabase) PreimagesFromRecording ¶
func (r *RecordingDatabase) PreimagesFromRecording(chainContextIf core.ChainContext, recordingDb *RecordingKV) (map[common.Hash][]byte, error)
func (*RecordingDatabase) PrepareRecording ¶
func (r *RecordingDatabase) PrepareRecording(ctx context.Context, lastBlockHeader *types.Header, logFunc StateBuildingLogFunction) (*state.StateDB, core.ChainContext, *RecordingKV, error)
func (*RecordingDatabase) ReferenceCount ¶
func (r *RecordingDatabase) ReferenceCount() int64
func (*RecordingDatabase) StateFor ¶
Normal geth state.New + Reference is not atomic vs Dereference. This one is. This function does not recreate a state
func (*RecordingDatabase) WriteStateToDatabase ¶
func (r *RecordingDatabase) WriteStateToDatabase(header *types.Header) error
type RecordingKV ¶
type RecordingKV struct {
// contains filtered or unexported fields
}
func (*RecordingKV) Close ¶
func (db *RecordingKV) Close() error
func (*RecordingKV) Delete ¶
func (db *RecordingKV) Delete(key []byte) error
func (*RecordingKV) EnableBypass ¶
func (db *RecordingKV) EnableBypass()
func (*RecordingKV) GetRecordedEntries ¶
func (db *RecordingKV) GetRecordedEntries() map[common.Hash][]byte
func (*RecordingKV) NewBatch ¶
func (db *RecordingKV) NewBatch() ethdb.Batch
func (*RecordingKV) NewBatchWithSize ¶
func (db *RecordingKV) NewBatchWithSize(size int) ethdb.Batch
func (*RecordingKV) NewIterator ¶
func (db *RecordingKV) NewIterator(prefix []byte, start []byte) ethdb.Iterator
func (*RecordingKV) NewSnapshot ¶
func (db *RecordingKV) NewSnapshot() (ethdb.Snapshot, error)
func (*RecordingKV) Release ¶
func (db *RecordingKV) Release()
type SyncProgressBackend ¶
type TransactionArgs ¶
type TransactionArgs = ethapi.TransactionArgs
Click to show internal directories.
Click to hide internal directories.