Versions in this module Expand all Collapse all v1 v1.0.0 Nov 13, 2020 Changes in this version + const AnnounceMsg + const BlockBodiesMsg + const BlockHeadersMsg + const CodeMsg + const ErrDecode + const ErrExtraStatusMsg + const ErrGenesisBlockMismatch + const ErrInvalidMsgCode + const ErrInvalidResponse + const ErrMissingKey + const ErrMsgTooLarge + const ErrNetworkIdMismatch + const ErrNoStatusMsg + const ErrProtocolVersionMismatch + const ErrRequestRejected + const ErrSuspendedPeer + const ErrTooManyTimeouts + const ErrUnexpectedResponse + const ErrUselessPeer + const GetBlockBodiesMsg + const GetBlockHeadersMsg + const GetCodeMsg + const GetHelperTrieProofsMsg + const GetProofsV2Msg + const GetReceiptsMsg + const GetTxStatusMsg + const HelperTrieProofsMsg + const MaxBodyFetch + const MaxCodeFetch + const MaxHeaderFetch + const MaxHelperTrieProofsFetch + const MaxProofsFetch + const MaxReceiptFetch + const MaxTxSend + const MaxTxStatus + const MsgBlockBodies + const MsgCode + const MsgHelperTrieProofs + const MsgProofsV2 + const MsgReceipts + const MsgTxStatus + const NetworkId + const ProofsV2Msg + const ProtocolMaxMsgSize + const ReceiptsMsg + const ResumeMsg + const SendTxV2Msg + const StatusMsg + const StopMsg + const TxStatusMsg + var AdvertiseProtocolVersions = []uint + var ClientProtocolVersions = []uint + var ProtocolLengths = map[uint]uint64 + var ServerProtocolVersions = []uint + type BlockRequest light.BlockRequest + func (r *BlockRequest) CanSend(peer *peer) bool + func (r *BlockRequest) GetCost(peer *peer) uint64 + func (r *BlockRequest) Request(reqID uint64, peer *peer) error + func (r *BlockRequest) Validate(db ethdb.Database, msg *Msg) error + type BloomReq struct + BitIdx uint64 + BloomTrieNum uint64 + FromLevel uint64 + SectionIndex uint64 + type BloomRequest light.BloomRequest + func (r *BloomRequest) CanSend(peer *peer) bool + func (r *BloomRequest) GetCost(peer *peer) uint64 + func (r *BloomRequest) Request(reqID uint64, peer *peer) error + func (r *BloomRequest) Validate(db ethdb.Database, msg *Msg) error + type ChtRequest light.ChtRequest + func (r *ChtRequest) CanSend(peer *peer) bool + func (r *ChtRequest) GetCost(peer *peer) uint64 + func (r *ChtRequest) Request(reqID uint64, peer *peer) error + func (r *ChtRequest) Validate(db ethdb.Database, msg *Msg) error + type CodeData []struct + type CodeReq struct + AccKey []byte + BHash common.Hash + type CodeRequest light.CodeRequest + func (r *CodeRequest) CanSend(peer *peer) bool + func (r *CodeRequest) GetCost(peer *peer) uint64 + func (r *CodeRequest) Request(reqID uint64, peer *peer) error + func (r *CodeRequest) Validate(db ethdb.Database, msg *Msg) error + type HelperTrieReq struct + AuxReq uint + FromLevel uint + Key []byte + TrieIdx uint64 + Type uint + type HelperTrieResps struct + AuxData [][]byte + Proofs light.NodeList + type LesApiBackend struct + func (b *LesApiBackend) AccountManager() *accounts.Manager + func (b *LesApiBackend) AddNonce(ctx context.Context, pid *big.Int, nonce *big.Int, Number *big.Int) (*core.GeneratorStateImpl, error) + func (b *LesApiBackend) BlockByHash(ctx context.Context, hash common.Hash) (*types.Block, error) + func (b *LesApiBackend) BlockByNumber(ctx context.Context, number rpc.BlockNumber) (*types.Block, error) + func (b *LesApiBackend) BlockByNumberOrHash(ctx context.Context, blockNrOrHash rpc.BlockNumberOrHash) (*types.Block, error) + func (b *LesApiBackend) BloomStatus() (uint64, uint64) + func (b *LesApiBackend) ChainConfig() *params.ChainConfig + func (b *LesApiBackend) ChainDb() ethdb.Database + func (b *LesApiBackend) CurrentBlock() *types.Block + func (b *LesApiBackend) Downloader() *downloader.Downloader + func (b *LesApiBackend) EventMux() *event.TypeMux + func (b *LesApiBackend) ExtRPCEnabled() bool + func (b *LesApiBackend) GetAllGenerators(ctx context.Context) cmap.ConcurrentMap + func (b *LesApiBackend) GetCommitHeader(ctx context.Context) (*types.Header, error) + func (b *LesApiBackend) GetCurrentBlock(ctx context.Context) (*big.Int, error) + func (b *LesApiBackend) GetEVM(ctx context.Context, msg core.Message, state *state.StateDB, ...) (*vm.EVM, func() error, error) + func (b *LesApiBackend) GetLogs(ctx context.Context, hash common.Hash) ([][]*types.Log, error) + func (b *LesApiBackend) GetPoolNonce(ctx context.Context, addr common.Address) (uint64, error) + func (b *LesApiBackend) GetPoolTransaction(txHash common.Hash) *types.Transaction + func (b *LesApiBackend) GetPoolTransactions() (types.Transactions, error) + func (b *LesApiBackend) GetReceipts(ctx context.Context, hash common.Hash) (types.Receipts, error) + func (b *LesApiBackend) GetTd(hash common.Hash) *big.Int + func (b *LesApiBackend) GetTransaction(ctx context.Context, txHash common.Hash) (*types.Transaction, common.Hash, uint64, uint64, error) + func (b *LesApiBackend) HeaderByHash(ctx context.Context, hash common.Hash) (*types.Header, error) + func (b *LesApiBackend) HeaderByNumber(ctx context.Context, number rpc.BlockNumber) (*types.Header, error) + func (b *LesApiBackend) HeaderByNumberOrHash(ctx context.Context, blockNrOrHash rpc.BlockNumberOrHash) (*types.Header, error) + func (b *LesApiBackend) ProtocolVersion() int + func (b *LesApiBackend) RPCGasCap() *big.Int + func (b *LesApiBackend) RemoveTx(txHash common.Hash) + func (b *LesApiBackend) SendTx(ctx context.Context, signedTx *types.Transaction) error + func (b *LesApiBackend) ServiceFilter(ctx context.Context, session *bloombits.MatcherSession) + func (b *LesApiBackend) SetHead(number uint64) + func (b *LesApiBackend) StateAndHeaderByNumber(ctx context.Context, number rpc.BlockNumber) (*state.StateDB, *types.Header, error) + func (b *LesApiBackend) StateAndHeaderByNumberOrHash(ctx context.Context, blockNrOrHash rpc.BlockNumberOrHash) (*state.StateDB, *types.Header, error) + func (b *LesApiBackend) Stats() (pending int, queued int) + func (b *LesApiBackend) SubscribeChainEvent(ch chan<- core.ChainEvent) event.Subscription + func (b *LesApiBackend) SubscribeChainHeadEvent(ch chan<- core.ChainHeadEvent) event.Subscription + func (b *LesApiBackend) SubscribeChainSideEvent(ch chan<- core.ChainSideEvent) event.Subscription + func (b *LesApiBackend) SubscribeLogsEvent(ch chan<- []*types.Log) event.Subscription + func (b *LesApiBackend) SubscribeNewTxsEvent(ch chan<- core.NewTxsEvent) event.Subscription + func (b *LesApiBackend) SubscribeRemovedLogsEvent(ch chan<- core.RemovedLogsEvent) event.Subscription + func (b *LesApiBackend) SuggestPrice(ctx context.Context) (*big.Int, error) + func (b *LesApiBackend) TxPoolContent() (map[common.Address]types.Transactions, map[common.Address]types.Transactions) + type LesOdr struct + func NewLesOdr(db ethdb.Database, config *light.IndexerConfig, retriever *retrieveManager) *LesOdr + func (odr *LesOdr) BloomIndexer() *core.ChainIndexer + func (odr *LesOdr) BloomTrieIndexer() *core.ChainIndexer + func (odr *LesOdr) ChtIndexer() *core.ChainIndexer + func (odr *LesOdr) Database() ethdb.Database + func (odr *LesOdr) IndexerConfig() *light.IndexerConfig + func (odr *LesOdr) Retrieve(ctx context.Context, req light.OdrRequest) (err error) + func (odr *LesOdr) SetIndexers(chtIndexer, bloomTrieIndexer, bloomIndexer *core.ChainIndexer) + func (odr *LesOdr) Stop() + type LesOdrRequest interface + CanSend func(*peer) bool + GetCost func(*peer) uint64 + Request func(uint64, *peer) error + Validate func(ethdb.Database, *Msg) error + func LesRequest(req light.OdrRequest) LesOdrRequest + type LesServer struct + func NewLesServer(e *eth.Ethereum, config *eth.Config) (*LesServer, error) + func (s *LesServer) APIs() []rpc.API + func (s *LesServer) Protocols() []p2p.Protocol + func (s *LesServer) SetBloomBitsIndexer(bloomIndexer *core.ChainIndexer) + func (s *LesServer) SetContractBackend(backend bind.ContractBackend) + func (s *LesServer) Start(srvr *p2p.Server) + func (s *LesServer) Stop() + type LightDummyAPI struct + func (s *LightDummyAPI) Coinbase() (common.Address, error) + func (s *LightDummyAPI) Etherbase() (common.Address, error) + func (s *LightDummyAPI) Hashrate() hexutil.Uint + func (s *LightDummyAPI) Mining() bool + type LightEthereum struct + ApiBackend *LesApiBackend + func New(ctx *node.ServiceContext, config *eth.Config) (*LightEthereum, error) + func (s *LightEthereum) APIs() []rpc.API + func (s *LightEthereum) BlockChain() *light.LightChain + func (s *LightEthereum) Downloader() *downloader.Downloader + func (s *LightEthereum) Engine() consensus.Engine + func (s *LightEthereum) EventMux() *event.TypeMux + func (s *LightEthereum) LesVersion() int + func (s *LightEthereum) Protocols() []p2p.Protocol + func (s *LightEthereum) ResetWithGenesisBlock(gb *types.Block) + func (s *LightEthereum) SetContractBackend(backend bind.ContractBackend) + func (s *LightEthereum) Start(srvr *p2p.Server) error + func (s *LightEthereum) Stop() error + func (s *LightEthereum) TxPool() *light.TxPool + type Msg struct + MsgType int + Obj interface{} + ReqID uint64 + type NodeInfo struct + CHT params.TrustedCheckpoint + Config *params.ChainConfig + Difficulty *big.Int + Genesis common.Hash + Head common.Hash + Network uint64 + type PrivateDebugAPI struct + func NewPrivateDebugAPI(server *LesServer) *PrivateDebugAPI + func (api *PrivateDebugAPI) FreezeClient(id enode.ID) error + type PrivateLightAPI struct + func NewPrivateLightAPI(backend *lesCommons) *PrivateLightAPI + func (api *PrivateLightAPI) GetCheckpoint(index uint64) ([3]string, error) + func (api *PrivateLightAPI) GetCheckpointContractAddress() (string, error) + func (api *PrivateLightAPI) LatestCheckpoint() ([4]string, error) + type PrivateLightServerAPI struct + func NewPrivateLightServerAPI(server *LesServer) *PrivateLightServerAPI + func (api *PrivateLightServerAPI) AddBalance(id enode.ID, value int64, meta string) ([2]uint64, error) + func (api *PrivateLightServerAPI) Benchmark(setups []map[string]interface{}, passCount, length int) ([]map[string]interface{}, error) + func (api *PrivateLightServerAPI) ClientInfo(ids []enode.ID) map[enode.ID]map[string]interface{} + func (api *PrivateLightServerAPI) PriorityClientInfo(start, stop enode.ID, maxCount int) map[enode.ID]map[string]interface{} + func (api *PrivateLightServerAPI) ServerInfo() map[string]interface{} + func (api *PrivateLightServerAPI) SetClientParams(ids []enode.ID, params map[string]interface{}) error + func (api *PrivateLightServerAPI) SetDefaultParams(params map[string]interface{}) error + type ProofReq struct + AccKey []byte + BHash common.Hash + FromLevel uint + Key []byte + type ReceiptsRequest light.ReceiptsRequest + func (r *ReceiptsRequest) CanSend(peer *peer) bool + func (r *ReceiptsRequest) GetCost(peer *peer) uint64 + func (r *ReceiptsRequest) Request(reqID uint64, peer *peer) error + func (r *ReceiptsRequest) Validate(db ethdb.Database, msg *Msg) error + type RequestCostList []requestCostListItem + type TrieRequest light.TrieRequest + func (r *TrieRequest) CanSend(peer *peer) bool + func (r *TrieRequest) GetCost(peer *peer) uint64 + func (r *TrieRequest) Request(reqID uint64, peer *peer) error + func (r *TrieRequest) Validate(db ethdb.Database, msg *Msg) error + type TxStatusRequest light.TxStatusRequest + func (r *TxStatusRequest) CanSend(peer *peer) bool + func (r *TxStatusRequest) GetCost(peer *peer) uint64 + func (r *TxStatusRequest) Request(reqID uint64, peer *peer) error + func (r *TxStatusRequest) Validate(db ethdb.Database, msg *Msg) error