Versions in this module Expand all Collapse all v1 v1.0.1 Mar 1, 2020 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 ProtocolLengths = []uint64 + var ProtocolVersions = []uint + func CreateConsensusEngine(ctx *node.ServiceContext, chainConfig *params.ChainConfig, ...) consensus.Engine + func CreateDB(ctx *node.ServiceContext, config *Config, name string) (ethdb.Database, error) + func NewBloomIndexer(db ethdb.Database, size, confirms uint64) *core.ChainIndexer + type BadBlockArgs struct + Block map[string]interface{} + Hash common.Hash + RLP string + type BloomIndexer struct + func (b *BloomIndexer) Commit() error + func (b *BloomIndexer) Process(ctx context.Context, header *types.Header) error + func (b *BloomIndexer) Reset(ctx context.Context, section uint64, lastSectionHead common.Hash) error + type CandidateInfo struct + Candidate common.Address + Deposit *big.Int + RewardRatio uint64 + TotalVotes *big.Int + type Config struct + Coinbase common.Address + ConstantinopleOverride *big.Int + DatabaseCache int + DatabaseHandles int + DocRoot string + Dpos bool + EVMInterpreter string + EWASMInterpreter string + EnablePreimageRecording bool + Ethash ethash.Config + GPO gasprice.Config + Genesis *core.Genesis + LightPeers int + LightServ int + MinerExtraData []byte + MinerGasCeil uint64 + MinerGasFloor uint64 + MinerGasPrice *big.Int + MinerNotify []string + MinerNoverify bool + MinerRecommit time.Duration + NetworkId uint64 + NoPruning bool + SkipBcVersionCheck bool + StorageClient bool + StorageClientDir string + StorageHost bool + SyncMode downloader.SyncMode + TrieCleanCache int + TrieDirtyCache int + TrieTimeout time.Duration + TxPool core.TxPoolConfig + Validator common.Address + Whitelist map[uint64]common.Hash + func (c *Config) UnmarshalTOML(unmarshal func(interface{}) error) error + func (c Config) MarshalTOML() (interface{}, error) + type DelegatorInfo struct + Delegator common.Address + Vote *big.Int + type DelegatorReward struct + Delegator common.Address + Reward *big.Int + 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) 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) GetHostEnodeURL() string + func (b *EthAPIBackend) GetLogs(ctx context.Context, hash common.Hash) ([][]*types.Log, error) + func (b *EthAPIBackend) GetPoolNonce(ctx context.Context, addr common.Address) (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) GetTd(blockHash common.Hash) *big.Int + func (b *EthAPIBackend) HeaderByHash(ctx context.Context, hash common.Hash) (*types.Header, error) + func (b *EthAPIBackend) HeaderByNumber(ctx context.Context, blockNr rpc.BlockNumber) (*types.Header, error) + 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) SignByNode(hash []byte) ([]byte, error) + 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) SubscribeChainChangeEvent(ch chan<- core.ChainChangeEvent) event.Subscription + 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) (*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) (*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) ChainConfig() *params.ChainConfig + func (s *Ethereum) ChainDb() ethdb.Database + func (s *Ethereum) CheckAndUpdateConnection(peerNode *enode.Node) + func (s *Ethereum) Coinbase() (eb common.Address, err error) + func (s *Ethereum) CurrentBlock() *types.Block + func (s *Ethereum) Downloader() *downloader.Downloader + func (s *Ethereum) DposCtxAt(root *types.DposContextRoot) (*types.DposContext, error) + func (s *Ethereum) Engine() consensus.Engine + func (s *Ethereum) EthVersion() int + func (s *Ethereum) EventMux() *event.TypeMux + func (s *Ethereum) GetBlockByHash(blockHash common.Hash) (*types.Block, error) + func (s *Ethereum) GetBlockByNumber(number uint64) (*types.Block, error) + func (s *Ethereum) GetBlockChain() *core.BlockChain + func (s *Ethereum) GetCurrentBlockHeight() uint64 + func (s *Ethereum) GetHostEnodeURL() string + func (s *Ethereum) GetPoolNonce(ctx context.Context, addr common.Address) (uint64, error) + func (s *Ethereum) GetStorageHostSetting(enodeID enode.ID, enodeURL string, config *storage.HostExtConfig) error + func (s *Ethereum) IsListening() bool + func (s *Ethereum) IsMining() bool + func (s *Ethereum) Miner() *miner.Miner + func (s *Ethereum) NetVersion() uint64 + func (s *Ethereum) Protocols() []p2p.Protocol + func (s *Ethereum) ResetWithGenesisBlock(gb *types.Block) + func (s *Ethereum) RevisionOrRenewingDone(hostID enode.ID) + func (s *Ethereum) SelfEnodeURL() string + func (s *Ethereum) SendTx(ctx context.Context, signedTx *types.Transaction) error + func (s *Ethereum) SetCoinbase(coinbase common.Address) + func (s *Ethereum) SetStatic(node *enode.Node) + func (s *Ethereum) SetValidator(validator common.Address) + func (s *Ethereum) SetupConnection(enodeURL string) (storagePeer storage.Peer, err error) + func (s *Ethereum) SignWithNodeSk(hash []byte) ([]byte, error) + func (s *Ethereum) Start(srvr *p2p.Server) error + func (s *Ethereum) StartMining(threads int) error + func (s *Ethereum) Stop() error + func (s *Ethereum) StopMining() + func (s *Ethereum) SubscribeChainChangeEvent(ch chan<- core.ChainChangeEvent) event.Subscription + func (s *Ethereum) SuggestPrice(ctx context.Context) (*big.Int, error) + func (s *Ethereum) TryToRenewOrRevise(hostID enode.ID) bool + func (s *Ethereum) TxPool() *core.TxPool + func (s *Ethereum) Validator() (common.Address, error) + 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) ([]*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) StandardTraceBadBlockToFile(ctx context.Context, hash common.Hash, config *StdTraceConfig) ([]string, error) + func (api *PrivateDebugAPI) StandardTraceBlockToFile(ctx context.Context, hash common.Hash, config *StdTraceConfig) ([]string, error) + func (api *PrivateDebugAPI) StorageRangeAt(ctx context.Context, blockHash common.Hash, txIndex int, ...) (StorageRangeResult, error) + func (api *PrivateDebugAPI) TraceBadBlock(ctx context.Context, hash common.Hash, config *TraceConfig) ([]*txTraceResult, 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) SetCoinbase(coinbase common.Address) bool + func (api *PrivateMinerAPI) SetExtra(extra string) (bool, error) + func (api *PrivateMinerAPI) SetGasPrice(gasPrice hexutil.Big) bool + func (api *PrivateMinerAPI) SetValidator(validator common.Address) bool + func (api *PrivateMinerAPI) Start(threads *int) error + func (api *PrivateMinerAPI) Stop() + type ProtocolManager struct + SubProtocols []p2p.Protocol + func NewProtocolManager(eth *Ethereum, config *params.ChainConfig, mode downloader.SyncMode, ...) (*ProtocolManager, error) + func (pm *ProtocolManager) BroadcastBlock(block *types.Block, propagate bool) + func (pm *ProtocolManager) BroadcastTxs(txs types.Transactions) + func (pm *ProtocolManager) NodeInfo() *NodeInfo + func (pm *ProtocolManager) Start(maxPeers int) + func (pm *ProtocolManager) Stop() + type PublicDebugAPI struct + func NewPublicDebugAPI(eth *Ethereum) *PublicDebugAPI + func (api *PublicDebugAPI) DumpBlock(blockNr rpc.BlockNumber) (state.Dump, error) + type PublicDposAPI struct + func NewPublicDposAPI(e *Ethereum) *PublicDposAPI + func (d *PublicDposAPI) Candidate(addr common.Address, blockNr *rpc.BlockNumber) (CandidateInfo, error) + func (d *PublicDposAPI) CandidateDeposit(addr common.Address, blockNr *rpc.BlockNumber) (*big.Int, error) + func (d *PublicDposAPI) Candidates(blockNr *rpc.BlockNumber) ([]common.Address, error) + func (d *PublicDposAPI) EpochID(blockNr *rpc.BlockNumber) (int64, error) + func (d *PublicDposAPI) GetAllVotesOfCandidate(candidate common.Address, blockNr *rpc.BlockNumber) ([]DelegatorInfo, error) + func (d *PublicDposAPI) GetAllVotesOfValidator(validator common.Address, blockNr *rpc.BlockNumber) ([]DelegatorInfo, error) + func (d *PublicDposAPI) GetValidatorDistribution(validator common.Address, startNr, endNr *rpc.BlockNumber) ([]DelegatorReward, error) + func (d *PublicDposAPI) GetValidatorReward(validator common.Address, startNr, endNr *rpc.BlockNumber) (*big.Int, error) + func (d *PublicDposAPI) GetVotedCandidatesByAddress(delegator common.Address, blockNr *rpc.BlockNumber) ([]common.Address, error) + func (d *PublicDposAPI) Validator(addr common.Address, blockNr *rpc.BlockNumber) (ValidatorInfo, error) + func (d *PublicDposAPI) Validators(blockNr *rpc.BlockNumber) ([]common.Address, error) + func (d *PublicDposAPI) VoteDeposit(addr common.Address, blockNr *rpc.BlockNumber) (*big.Int, error) + type PublicEthereumAPI struct + func NewPublicEthereumAPI(e *Ethereum) *PublicEthereumAPI + func (api *PublicEthereumAPI) ChainId() hexutil.Uint64 + func (api *PublicEthereumAPI) Coinbase() (common.Address, error) + func (api *PublicEthereumAPI) Ethereum() *Ethereum + func (api *PublicEthereumAPI) Hashrate() hexutil.Uint64 + func (api *PublicEthereumAPI) Validator() (common.Address, error) + type PublicMinerAPI struct + func NewPublicMinerAPI(e *Ethereum) *PublicMinerAPI + func (api *PublicMinerAPI) Mining() bool + type StdTraceConfig struct + Reexec *uint64 + TxHash common.Hash + type StorageRangeResult struct + NextKey *common.Hash + Storage storageMap + type TraceConfig struct + Reexec *uint64 + Timeout *string + Tracer *string + type ValidatorInfo struct + EpochID int64 + MinedBlocks int64 + RewardRatio uint64 + TotalVotes *big.Int + Validator common.Address