Versions in this module Expand all Collapse all v1 v1.0.1 Dec 19, 2019 Changes in this version + const BlockBodiesMsg + const BlockHeadersMsg + const ErrDecode + const ErrExtraStatusMsg + const ErrGenesisBlockMismatch + const ErrInvalidMsgCode + const ErrMsgTooLarge + const ErrNetworkIdMismatch + const ErrNoStatusMsg + const ErrProtocolVersionMismatch + const ErrSuspendedPeer + const GetBlockBodiesMsg + const GetBlockHeadersMsg + const GetNodeDataMsg + const GetReceiptsMsg + const NewBlockHashesMsg + const NewBlockMsg + const NodeDataMsg + const ProtocolMaxMsgSize + const ReceiptsMsg + const StatusMsg + const TxMsg + var DefaultConfig = Config + var ErrAppIdExists = errors.New("this appId already exists") + var ErrMissingAppId = errors.New("the appid is missing") + var ErrNoSideChain = errors.New(...) + var ErrNoSideMiner = errors.New(...) + var ErrWrongNumber = errors.New("wrong BlockNumber") + var ProtocolLengths = []uint64 + var ProtocolName = "eth" + var ProtocolVersions = []uint + func CreateConsensusEngine(ctx *node.ServiceContext, config *ethash.Config, ...) consensus.Engine + func CreateDB(ctx *node.ServiceContext, config *Config, name string) (ethdb.Database, error) + func JointByte(appId string, msg uint64) uint64 + func MakeSideEngine(s *Ethereum, chainConfig *params.ChainConfig, db ethdb.Database) consensus.Engine + func NewBloomIndexer(db ethdb.Database, size uint64) *core.ChainIndexer + func UnJointToAppId(joint uint64) string + func UnJointToMsg(joint uint64) uint64 + type BloomIndexer struct + func (b *BloomIndexer) Commit() error + func (b *BloomIndexer) Process(header *types.Header) + func (b *BloomIndexer) Reset(section uint64, lastSectionHead common.Hash) error + type Config struct + DatabaseCache int + DatabaseHandles int + DocRoot string + EnablePreimageRecording bool + Ethash ethash.Config + Etherbase common.Address + ExtraData []byte + GPO gasprice.Config + GasPrice *big.Int + Genesis *core.Genesis + LightPeers int + LightServ int + MinerThreads int + NetworkId uint64 + NoPruning bool + SkipBcVersionCheck bool + SyncMode downloader.SyncMode + TrieCache int + TrieTimeout time.Duration + TxPool core.TxPoolConfig + func (c *Config) UnmarshalTOML(unmarshal func(interface{}) error) error + func (c Config) MarshalTOML() (interface{}, error) + type EthAPIBackend struct + func (b *EthAPIBackend) AccountManager() *accounts.Manager + func (b *EthAPIBackend) BlockByNumber(ctx context.Context, blockNr rpc.BlockNumber) (*types.Block, error) + func (b *EthAPIBackend) BlockChain() ethapi.BlockChain + func (b *EthAPIBackend) BloomStatus() (uint64, uint64) + func (b *EthAPIBackend) ChainConfig() *params.ChainConfig + func (b *EthAPIBackend) ChainDb() ethdb.Database + func (b *EthAPIBackend) CurrentBlock() *types.Block + func (b *EthAPIBackend) Downloader() *downloader.Downloader + func (b *EthAPIBackend) EventMux() *event.TypeMux + func (b *EthAPIBackend) GetBlock(ctx context.Context, hash common.Hash) (*types.Block, error) + func (b *EthAPIBackend) GetEVM(ctx context.Context, msg core.Message, state *state.StateDB, ...) (*vm.EVM, func() error, error) + func (b *EthAPIBackend) GetLogs(ctx context.Context, hash common.Hash) ([][]*types.Log, error) + func (b *EthAPIBackend) GetPoolNonce(ctx context.Context, addr common.Address, appid string) (uint64, error) + func (b *EthAPIBackend) GetPoolTransaction(hash common.Hash) *types.Transaction + func (b *EthAPIBackend) GetPoolTransactions() (types.Transactions, error) + func (b *EthAPIBackend) GetReceipts(ctx context.Context, hash common.Hash) (types.Receipts, error) + func (b *EthAPIBackend) GetSideBlock(ctx context.Context, hash common.Hash, appId string) (*types.Block, error) + func (b *EthAPIBackend) GetSideChains() map[string]*core.BlockChain + func (b *EthAPIBackend) GetTd(blockHash common.Hash) *big.Int + func (b *EthAPIBackend) HeaderByNumber(ctx context.Context, blockNr rpc.BlockNumber) (*types.Header, error) + func (b *EthAPIBackend) NodeConfig() *node.Config + func (b *EthAPIBackend) ProtocolVersion() int + func (b *EthAPIBackend) SendTx(ctx context.Context, signedTx *types.Transaction) error + func (b *EthAPIBackend) ServiceFilter(ctx context.Context, session *bloombits.MatcherSession) + func (b *EthAPIBackend) SetHead(number uint64) + func (b *EthAPIBackend) SideBlockByNumber(ctx context.Context, blockNr rpc.BlockNumber, appId string) (*types.Block, error) + func (b *EthAPIBackend) SideBlockChain(appId string) (*core.BlockChain, bool) + func (b *EthAPIBackend) SideHeaderByNumber(ctx context.Context, blockNr rpc.BlockNumber, appId string) (*types.Header, error) + func (b *EthAPIBackend) SideStateAndHeaderByNumber(ctx context.Context, blockNr rpc.BlockNumber, appId string) (*state.StateDB, *types.Header, error) + func (b *EthAPIBackend) SideTxPool(appId string) *core.TxPool + func (b *EthAPIBackend) StateAndHeaderByNumber(ctx context.Context, blockNr rpc.BlockNumber) (*state.StateDB, *types.Header, error) + func (b *EthAPIBackend) Stats() (pending int, queued int) + func (b *EthAPIBackend) SubscribeChainEvent(ch chan<- core.ChainEvent) event.Subscription + func (b *EthAPIBackend) SubscribeChainHeadEvent(ch chan<- core.ChainHeadEvent) event.Subscription + func (b *EthAPIBackend) SubscribeChainSideEvent(ch chan<- core.ChainSideEvent) event.Subscription + func (b *EthAPIBackend) SubscribeLogsEvent(ch chan<- []*types.Log) event.Subscription + func (b *EthAPIBackend) SubscribeNewTxsEvent(ch chan<- core.NewTxsEvent) event.Subscription + func (b *EthAPIBackend) SubscribeRemovedLogsEvent(ch chan<- core.RemovedLogsEvent) event.Subscription + func (b *EthAPIBackend) SuggestPrice(ctx context.Context, appId string) (*big.Int, error) + func (b *EthAPIBackend) TxPoolContent() (map[common.Address]types.Transactions, map[common.Address]types.Transactions) + type Ethereum struct + APIBackend *EthAPIBackend + func New(ctx *node.ServiceContext, config *Config, nodeCfg *node.Config) (*Ethereum, error) + func (s *Ethereum) APIs() []rpc.API + func (s *Ethereum) AccountManager() *accounts.Manager + func (s *Ethereum) AddLesServer(ls LesServer) + func (s *Ethereum) BlockChain() *core.BlockChain + func (s *Ethereum) ChainDb() ethdb.Database + func (s *Ethereum) Downloader() *downloader.Downloader + func (s *Ethereum) Engine() consensus.Engine + func (s *Ethereum) EthVersion() int + func (s *Ethereum) Etherbase() (eb common.Address, err error) + func (s *Ethereum) EventMux() *event.TypeMux + func (s *Ethereum) GetSideChains() map[string]*core.BlockChain + func (s *Ethereum) IsListening() bool + func (s *Ethereum) IsMining() bool + func (s *Ethereum) Miner() *miner.Miner + func (s *Ethereum) NetVersion() uint64 + func (s *Ethereum) NewPassiveMiner(id string) + func (s *Ethereum) NewSideChain(idSync bool, appId string) error + func (s *Ethereum) Protocols() []p2p.Protocol + func (s *Ethereum) ResetWithGenesisBlock(gb *types.Block) + func (s *Ethereum) SetEtherbase(etherbase common.Address) + func (s *Ethereum) SideBlockChain(appId string) (*core.BlockChain, bool) + func (s *Ethereum) SideMiner(appId string) core.Miner + func (s *Ethereum) SideTxPool(appId string) *core.TxPool + func (s *Ethereum) Start(srvr *p2p.Server) error + func (s *Ethereum) StartMining(local bool, id string) error + func (s *Ethereum) Stop() error + func (s *Ethereum) StopMining() + func (s *Ethereum) TxPool() *core.TxPool + type LesServer interface + Protocols func() []p2p.Protocol + SetBloomBitsIndexer func(bbIndexer *core.ChainIndexer) + Start func(srvr *p2p.Server) + Stop func() + type NodeInfo struct + Config *params.ChainConfig + Difficulty *big.Int + Genesis common.Hash + Head common.Hash + Network uint64 + type PeerInfo struct + Difficulty *big.Int + Head string + Version int + type PrivateAdminAPI struct + func NewPrivateAdminAPI(eth *Ethereum) *PrivateAdminAPI + func (api *PrivateAdminAPI) ExportChain(file string) (bool, error) + func (api *PrivateAdminAPI) ImportChain(file string) (bool, error) + type PrivateDebugAPI struct + func NewPrivateDebugAPI(config *params.ChainConfig, eth *Ethereum) *PrivateDebugAPI + func (api *PrivateDebugAPI) GetBadBlocks(ctx context.Context) ([]core.BadBlockArgs, error) + func (api *PrivateDebugAPI) GetModifiedAccountsByHash(startHash common.Hash, endHash *common.Hash) ([]common.Address, error) + func (api *PrivateDebugAPI) GetModifiedAccountsByNumber(startNum uint64, endNum *uint64) ([]common.Address, error) + func (api *PrivateDebugAPI) Preimage(ctx context.Context, hash common.Hash) (hexutil.Bytes, error) + func (api *PrivateDebugAPI) StorageRangeAt(ctx context.Context, blockHash common.Hash, txIndex int, ...) (StorageRangeResult, error) + func (api *PrivateDebugAPI) TraceBlock(ctx context.Context, blob []byte, config *TraceConfig) ([]*txTraceResult, error) + func (api *PrivateDebugAPI) TraceBlockByHash(ctx context.Context, hash common.Hash, config *TraceConfig) ([]*txTraceResult, error) + func (api *PrivateDebugAPI) TraceBlockByNumber(ctx context.Context, number rpc.BlockNumber, config *TraceConfig) ([]*txTraceResult, error) + func (api *PrivateDebugAPI) TraceBlockFromFile(ctx context.Context, file string, config *TraceConfig) ([]*txTraceResult, error) + func (api *PrivateDebugAPI) TraceChain(ctx context.Context, start, end rpc.BlockNumber, config *TraceConfig) (*rpc.Subscription, error) + func (api *PrivateDebugAPI) TraceTransaction(ctx context.Context, hash common.Hash, config *TraceConfig) (interface{}, error) + type PrivateMinerAPI struct + func NewPrivateMinerAPI(e *Ethereum) *PrivateMinerAPI + func (api *PrivateMinerAPI) GetHashrate() uint64 + func (api *PrivateMinerAPI) SetEtherbase(etherbase common.Address) bool + func (api *PrivateMinerAPI) SetExtra(extra string) (bool, error) + func (api *PrivateMinerAPI) SetGasPrice(gasPrice hexutil.Big) bool + func (api *PrivateMinerAPI) SideMinerStart(appId string) error + func (api *PrivateMinerAPI) Start(threads *int, id string) error + func (api *PrivateMinerAPI) Stop() bool + func (api *PrivateMinerAPI) StopSide(appId string) bool + type ProtocolManager struct + SideChains map[string]*core.BlockChain + SideDownloader map[string]*downloader.Downloader + SideTxPool map[string]*core.TxPool + SubProtocols []p2p.Protocol + func NewProtocolManager(config *params.ChainConfig, mode downloader.SyncMode, networkId uint64, ...) (*ProtocolManager, error) + func (pm *ProtocolManager) BroadcastBlock(block *types.Block, propagate bool) + func (pm *ProtocolManager) BroadcastTxs(txs types.Transactions) + func (pm *ProtocolManager) ExistsAppId(appId string) (*core.BlockChain, error) + func (pm *ProtocolManager) GetBlockByHashAll(hash common.Hash, appId string) *types.Block + func (pm *ProtocolManager) NodeInfo() *NodeInfo + func (pm *ProtocolManager) Start(maxPeers int) + func (pm *ProtocolManager) Stop() + func (pm *ProtocolManager) TxShunt(idTx map[string][]*types.Transaction, tx *types.Transaction) + type PublicDebugAPI struct + func NewPublicDebugAPI(eth *Ethereum) *PublicDebugAPI + func (api *PublicDebugAPI) DumpBlock(blockNr rpc.BlockNumber) (state.Dump, error) + type PublicEthereumAPI struct + func NewPublicEthereumAPI(e *Ethereum) *PublicEthereumAPI + func (api *PublicEthereumAPI) Coinbase() (common.Address, error) + func (api *PublicEthereumAPI) DeleteSideChain(appId string) error + func (api *PublicEthereumAPI) Etherbase() (common.Address, error) + func (api *PublicEthereumAPI) GetAllApp() map[string]*params.ChainConfig + func (api *PublicEthereumAPI) GetBlockRewards(blockNumber uint64, appId string) (map[common.Address]string, error) + func (api *PublicEthereumAPI) GetContractAddrByAppId(appId string) common.Address + func (api *PublicEthereumAPI) Hashrate() hexutil.Uint64 + func (api *PublicEthereumAPI) NewSideChain(appId string) error + type PublicMinerAPI struct + func NewPublicMinerAPI(e *Ethereum) *PublicMinerAPI + func (api *PublicMinerAPI) GetWork() ([3]string, error) + func (api *PublicMinerAPI) Mining() bool + func (api *PublicMinerAPI) SubmitHashrate(hashrate hexutil.Uint64, id common.Hash) bool + func (api *PublicMinerAPI) SubmitWork(nonce types.BlockNonce, solution, digest common.Hash) bool + type StorageRangeResult struct + NextKey *common.Hash + Storage storageMap + type TraceConfig struct + Reexec *uint64 + Timeout *string + Tracer *string