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 HeaderByNumber(blockchain *core.BlockChain, number rpc.BlockNumber) *types.Header
- func HeaderByNumberOrHash(blockchain *core.BlockChain, blockNrOrHash rpc.BlockNumberOrHash) (*types.Header, error)
- func NewRevertReason(result *core.ExecutionResult) error
- func PreimagesFromRecording(chainContextIf core.ChainContext, recordingDb *RecordingKV) (map[common.Hash][]byte, 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() []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, blockHash common.Hash) ([][]*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 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 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, FeeHistoryMaxBlockCount: 1024, ClassicRedirect: "", ArbDebug: ArbDebugConfig{ BlockRangeBound: 256, TimeoutQueueBound: 512, }, }
Functions ¶
func ConfigAddOptions ¶
func CreateFallbackClient ¶
func EstimateGas ¶
func HeaderByNumber ¶
func HeaderByNumber(blockchain *core.BlockChain, number rpc.BlockNumber) *types.Header
func HeaderByNumberOrHash ¶
func HeaderByNumberOrHash(blockchain *core.BlockChain, blockNrOrHash rpc.BlockNumberOrHash) (*types.Header, error)
func NewRevertReason ¶
func NewRevertReason(result *core.ExecutionResult) error
func PreimagesFromRecording ¶
func PreimagesFromRecording(chainContextIf core.ChainContext, recordingDb *RecordingKV) (map[common.Hash][]byte, 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() []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) (*Backend, 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"` // 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 NewRecordingChainContext ¶
func NewRecordingChainContext(inner core.ChainContext, blocknumber uint64) *RecordingChainContext
func (*RecordingChainContext) Engine ¶
func (r *RecordingChainContext) Engine() consensus.Engine
func (*RecordingChainContext) GetMinBlockNumberAccessed ¶
func (r *RecordingChainContext) GetMinBlockNumberAccessed() uint64
type RecordingKV ¶
type RecordingKV struct {
// contains filtered or unexported fields
}
func NewRecordingKV ¶
func NewRecordingKV(inner *trie.Database) *RecordingKV
func PrepareRecording ¶
func PrepareRecording(blockchain *core.BlockChain, lastBlockHeader *types.Header) (*state.StateDB, core.ChainContext, *RecordingKV, error)
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 SyncProgressBackend interface {
SyncProgressMap() map[string]interface{}
}
type TransactionArgs ¶
type TransactionArgs = ethapi.TransactionArgs
Click to show internal directories.
Click to hide internal directories.