Documentation ¶
Overview ¶
Package em implements the eminer-pro protocol.
Package em implements the eminer-pro protocol.
Index ¶
- Constants
- Variables
- func CreateDB(ctx *node.ServiceContext, config *Config, name string) (aoadb.Database, error)
- func CreateDacchainConsensusEngine() consensus.Engine
- func NewBloomIndexer(db aoadb.Database, size uint64) *core.ChainIndexer
- type BloomIndexer
- type Config
- type DacApiBackend
- func (b *DacApiBackend) AccountManager() *accounts.Manager
- func (b *DacApiBackend) BlockByNumber(ctx context.Context, blockNr rpc.BlockNumber) (*types.Block, error)
- func (b *DacApiBackend) BloomStatus() (uint64, uint64)
- func (b *DacApiBackend) ChainConfig() *params.ChainConfig
- func (b *DacApiBackend) ChainDb() aoadb.Database
- func (b *DacApiBackend) CurrentBlock() *types.Block
- func (b *DacApiBackend) Downloader() *downloader.Downloader
- func (b *DacApiBackend) GetBlock(ctx context.Context, blockHash common.Hash) (*types.Block, error)
- func (b *DacApiBackend) GetDelegatePoll(block *types.Block) (*map[common.Address]types.Candidate, error)
- func (b *DacApiBackend) GetDelegateWalletInfoCallback() func(data *aa.DelegateWalletInfo)
- func (b *DacApiBackend) GetEVM(ctx context.Context, msg core.Message, state *state.StateDB, ...) (*vm.EVM, func() error, error)
- func (b *DacApiBackend) GetInnerTxDb() watch.InnerTxDb
- func (b *DacApiBackend) GetPoolNonce(ctx context.Context, addr common.Address) (uint64, error)
- func (b *DacApiBackend) GetPoolTransaction(hash common.Hash) *types.Transaction
- func (b *DacApiBackend) GetPoolTransactions() (types.Transactions, error)
- func (b *DacApiBackend) GetReceipts(ctx context.Context, blockHash common.Hash) (types.Receipts, error)
- func (b *DacApiBackend) GetTd(blockHash common.Hash) *big.Int
- func (b *DacApiBackend) HeaderByNumber(ctx context.Context, blockNr rpc.BlockNumber) (*types.Header, error)
- func (b *DacApiBackend) IsWatchInnerTxEnable() bool
- func (b *DacApiBackend) ProtocolVersion() int
- func (b *DacApiBackend) SendTx(ctx context.Context, signedTx *types.Transaction) error
- func (b *DacApiBackend) ServiceFilter(ctx context.Context, session *bloombits.MatcherSession)
- func (b *DacApiBackend) SetHead(number uint64)
- func (b *DacApiBackend) StateAndHeaderByNumber(ctx context.Context, blockNr rpc.BlockNumber) (*state.StateDB, *types.Header, error)
- func (b *DacApiBackend) Stats() (pending int, queued int)
- func (b *DacApiBackend) SubscribeChainEvent(ch chan<- core.ChainEvent) event.Subscription
- func (b *DacApiBackend) SubscribeChainHeadEvent(ch chan<- core.ChainHeadEvent) event.Subscription
- func (b *DacApiBackend) SubscribeChainSideEvent(ch chan<- core.ChainSideEvent) event.Subscription
- func (b *DacApiBackend) SubscribeLogsEvent(ch chan<- []*types.Log) event.Subscription
- func (b *DacApiBackend) SubscribeRemovedLogsEvent(ch chan<- core.RemovedLogsEvent) event.Subscription
- func (b *DacApiBackend) SubscribeTxPreEvent(ch chan<- core.TxPreEvent) event.Subscription
- func (b *DacApiBackend) SuggestPrice(ctx context.Context) (*big.Int, error)
- func (b *DacApiBackend) TxPoolContent() (map[common.Address]types.Transactions, map[common.Address]types.Transactions)
- type Dacchain
- func (dacchain *Dacchain) APIs() []rpc.API
- func (dacchain *Dacchain) AccountManager() *accounts.Manager
- func (dacchain *Dacchain) AddLesServer(ls LesServer)
- func (dacchain *Dacchain) BlockChain() *core.BlockChain
- func (dacchain *Dacchain) ChainDb() aoadb.Database
- func (dacchain *Dacchain) Downloader() *downloader.Downloader
- func (dacchain *Dacchain) Engine() consensus.Engine
- func (dacchain *Dacchain) EthVersion() int
- func (dacchain *Dacchain) IsListening() bool
- func (dacchain *Dacchain) NetVersion() uint64
- func (dacchain *Dacchain) Protocols() []p2p.Protocol
- func (dacchain *Dacchain) ResetWithGenesisBlock(gb *types.Block)
- func (dacchain *Dacchain) Start(srvr *p2p.Server) error
- func (dacchain *Dacchain) Stop() error
- func (dacchain *Dacchain) TxPool() *core.TxPool
- func (dacchain *Dacchain) WatcherDb() aoadb.Database
- type DposTaskManager
- func (taskManager *DposTaskManager) GetCurrentDelegateByAddress(coinbase string) *types.ShuffleDel
- func (taskManager *DposTaskManager) GetCurrentShuffleRound() *types.ShuffleList
- func (taskManager *DposTaskManager) GetLocalCurrentRound() []string
- func (taskManager *DposTaskManager) ShuffleWhenVerifyFail(receiveBlockNumber int64, receiveBlockTime int64, shuffleBlockNumber *big.Int) error
- type LesServer
- type NodeInfo
- type PeerInfo
- type PrivateAdminAPI
- type 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) GetTranTypeNum() interface{}
- 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 ProtocolManager
- func (pm *ProtocolManager) BroadcastBlock(block *types.Block, propagate bool)
- func (pm *ProtocolManager) BroadcastBlockSignatures(blockHash []byte, signs []types.VoteSign)
- func (pm *ProtocolManager) BroadcastCommitBlock(block types.CommitBlock)
- func (pm *ProtocolManager) BroadcastTx(hash common.Hash, tx *types.Transaction)
- func (pm *ProtocolManager) GetAddDelegateWalletCallback() func(data *aa.DelegateWalletInfo)
- func (pm *ProtocolManager) NodeInfo() *NodeInfo
- func (pm *ProtocolManager) PreBroadcastBlock(block *types.Block)
- func (pm *ProtocolManager) Start(maxPeers int)
- func (pm *ProtocolManager) Stop()
- type PublicDebugAPI
- type StorageRangeResult
- type TraceConfig
Constants ¶
const ( // Protocol messages belonging to em/62 StatusMsg = 0x00 NewBlockHashesMsg = 0x01 TxMsg = 0x02 GetBlockHeadersMsg = 0x03 BlockHeadersMsg = 0x04 GetBlockBodiesMsg = 0x05 BlockBodiesMsg = 0x06 NewBlockMsg = 0x07 SignaturesBlockMsg = 0x08 // broadcast to delegate p2p network PreBlockMsg = 0x09 // Protocol messages belonging to em/63 GetNodeDataMsg = 0x0d NodeDataMsg = 0x0e GetReceiptsMsg = 0x0f ReceiptsMsg = 0x10 )
em protocol message codes
const ( ErrMsgTooLarge = iota ErrDecode ErrInvalidMsgCode ErrProtocolVersionMismatch ErrNetworkIdMismatch ErrGenesisBlockMismatch ErrNoStatusMsg ErrExtraStatusMsg ErrSuspendedPeer )
const ProtocolMaxMsgSize = 10 * 1024 * 1024 // Maximum cap on the size of a protocol message
Variables ¶
var DefaultConfig = Config{ SyncMode: downloader.FullSync, NetworkId: 1, LightPeers: 20, DatabaseCache: 128, GasPrice: big.NewInt(4 * params.Shannon), TxPool: core.DefaultTxPoolConfig, GPO: gasprice.Config{ Blocks: 20, Percentile: 60, }, }
DefaultConfig contains default settings for use on the eminer-pro main net.
var ProtocolLengths = []uint64{17, 17}
Number of implemented message corresponding to different protocol versions.
var ProtocolName = "aoa"
Official short name of the protocol used during capability negotiation.
var ProtocolVersions = []uint{aoa01, aoa02}
Supported versions of the em protocol (first is primary).
Functions ¶
func NewBloomIndexer ¶
func NewBloomIndexer(db aoadb.Database, size uint64) *core.ChainIndexer
NewBloomIndexer returns a chain indexer that generates bloom bits data for the canonical chain for fast logs filtering.
Types ¶
type BloomIndexer ¶
type BloomIndexer struct {
// contains filtered or unexported fields
}
BloomIndexer implements a core.ChainIndexer, building up a rotated bloom bits index for the eminer-pro header bloom filters, permitting blazing fast filtering.
func (*BloomIndexer) Commit ¶
func (b *BloomIndexer) Commit() error
Commit implements core.ChainIndexerBackend, finalizing the bloom section and writing it out into the database.
func (*BloomIndexer) Process ¶
func (b *BloomIndexer) Process(header *types.Header)
Process implements core.ChainIndexerBackend, adding a new header's bloom into the index.
type Config ¶
type Config struct { // The genesis block, which is inserted if the database is empty. // If nil, the eminer-pro main net block is used. Genesis *core.Genesis `toml:",omitempty"` // Protocol options NetworkId uint64 // Network ID to use for selecting peers to connect to SyncMode downloader.SyncMode // Light client options LightServ int `toml:",omitempty"` // Maximum percentage of time allowed for serving LES requests LightPeers int `toml:",omitempty"` // Maximum number of LES client peers // Database options SkipBcVersionCheck bool `toml:"-"` DatabaseHandles int `toml:"-"` DatabaseCache int // Mining-related options Dacchainbase common.Address `toml:",omitempty"` MinerThreads int `toml:",omitempty"` ExtraData []byte `toml:",omitempty"` GasPrice *big.Int // Transaction pool options TxPool core.TxPoolConfig // Gas Price Oracle options GPO gasprice.Config // Enables tracking of SHA3 preimages in the VM EnablePreimageRecording bool // Miscellaneous options DocRoot string `toml:"-"` // Enables Watching internal transactions in a contract call. EnableInterTxWatching bool }
func (Config) MarshalTOML ¶
MarshalTOML marshals as TOML.
func (*Config) UnmarshalTOML ¶
UnmarshalTOML unmarshals from TOML.
type DacApiBackend ¶
type DacApiBackend struct {
// contains filtered or unexported fields
}
implements emapi.Backend for full nodes
func (*DacApiBackend) AccountManager ¶
func (b *DacApiBackend) AccountManager() *accounts.Manager
func (*DacApiBackend) BlockByNumber ¶
func (b *DacApiBackend) BlockByNumber(ctx context.Context, blockNr rpc.BlockNumber) (*types.Block, error)
func (*DacApiBackend) BloomStatus ¶
func (b *DacApiBackend) BloomStatus() (uint64, uint64)
func (*DacApiBackend) ChainConfig ¶
func (b *DacApiBackend) ChainConfig() *params.ChainConfig
func (*DacApiBackend) ChainDb ¶
func (b *DacApiBackend) ChainDb() aoadb.Database
func (*DacApiBackend) CurrentBlock ¶
func (b *DacApiBackend) CurrentBlock() *types.Block
func (*DacApiBackend) Downloader ¶
func (b *DacApiBackend) Downloader() *downloader.Downloader
func (*DacApiBackend) GetDelegatePoll ¶
func (*DacApiBackend) GetDelegateWalletInfoCallback ¶
func (b *DacApiBackend) GetDelegateWalletInfoCallback() func(data *aa.DelegateWalletInfo)
func (*DacApiBackend) GetInnerTxDb ¶
func (b *DacApiBackend) GetInnerTxDb() watch.InnerTxDb
func (*DacApiBackend) GetPoolNonce ¶
func (*DacApiBackend) GetPoolTransaction ¶
func (b *DacApiBackend) GetPoolTransaction(hash common.Hash) *types.Transaction
func (*DacApiBackend) GetPoolTransactions ¶
func (b *DacApiBackend) GetPoolTransactions() (types.Transactions, error)
func (*DacApiBackend) GetReceipts ¶
func (*DacApiBackend) HeaderByNumber ¶
func (b *DacApiBackend) HeaderByNumber(ctx context.Context, blockNr rpc.BlockNumber) (*types.Header, error)
func (*DacApiBackend) IsWatchInnerTxEnable ¶
func (b *DacApiBackend) IsWatchInnerTxEnable() bool
func (*DacApiBackend) ProtocolVersion ¶
func (b *DacApiBackend) ProtocolVersion() int
func (*DacApiBackend) SendTx ¶
func (b *DacApiBackend) SendTx(ctx context.Context, signedTx *types.Transaction) error
func (*DacApiBackend) ServiceFilter ¶
func (b *DacApiBackend) ServiceFilter(ctx context.Context, session *bloombits.MatcherSession)
func (*DacApiBackend) SetHead ¶
func (b *DacApiBackend) SetHead(number uint64)
func (*DacApiBackend) StateAndHeaderByNumber ¶
func (b *DacApiBackend) StateAndHeaderByNumber(ctx context.Context, blockNr rpc.BlockNumber) (*state.StateDB, *types.Header, error)
func (*DacApiBackend) Stats ¶
func (b *DacApiBackend) Stats() (pending int, queued int)
func (*DacApiBackend) SubscribeChainEvent ¶
func (b *DacApiBackend) SubscribeChainEvent(ch chan<- core.ChainEvent) event.Subscription
func (*DacApiBackend) SubscribeChainHeadEvent ¶
func (b *DacApiBackend) SubscribeChainHeadEvent(ch chan<- core.ChainHeadEvent) event.Subscription
func (*DacApiBackend) SubscribeChainSideEvent ¶
func (b *DacApiBackend) SubscribeChainSideEvent(ch chan<- core.ChainSideEvent) event.Subscription
func (*DacApiBackend) SubscribeLogsEvent ¶
func (b *DacApiBackend) SubscribeLogsEvent(ch chan<- []*types.Log) event.Subscription
func (*DacApiBackend) SubscribeRemovedLogsEvent ¶
func (b *DacApiBackend) SubscribeRemovedLogsEvent(ch chan<- core.RemovedLogsEvent) event.Subscription
func (*DacApiBackend) SubscribeTxPreEvent ¶
func (b *DacApiBackend) SubscribeTxPreEvent(ch chan<- core.TxPreEvent) event.Subscription
func (*DacApiBackend) SuggestPrice ¶
func (*DacApiBackend) TxPoolContent ¶
func (b *DacApiBackend) TxPoolContent() (map[common.Address]types.Transactions, map[common.Address]types.Transactions)
type Dacchain ¶
type Dacchain struct { ApiBackend *DacApiBackend // contains filtered or unexported fields }
eminer-pro implements the eminer-pro full node service.
func New ¶
func New(ctx *node.ServiceContext, config *Config) (*Dacchain, error)
New creates a new eminer-pro object (including the initialisation of the common eminer-pro object)
func (*Dacchain) APIs ¶
APIs returns the collection of RPC services the dacchain package offers. NOTE, some of these services probably need to be moved to somewhere else.
func (*Dacchain) AccountManager ¶
func (*Dacchain) AddLesServer ¶
func (*Dacchain) BlockChain ¶
func (dacchain *Dacchain) BlockChain() *core.BlockChain
func (*Dacchain) Downloader ¶
func (dacchain *Dacchain) Downloader() *downloader.Downloader
func (*Dacchain) EthVersion ¶
func (*Dacchain) IsListening ¶
func (*Dacchain) NetVersion ¶
func (*Dacchain) Protocols ¶
Protocols implements node.Service, returning all the currently configured network protocols to start.
func (*Dacchain) ResetWithGenesisBlock ¶
func (*Dacchain) Start ¶
Start implements node.Service, starting all internal goroutines needed by the eminer-pro protocol implementation.
type DposTaskManager ¶
type DposTaskManager struct {
// contains filtered or unexported fields
}
func NewDposTaskManager ¶
func NewDposTaskManager(ctx *node.ServiceContext, blockchain *core.BlockChain, accountManager *accounts.Manager, produceBlockCallback func(ctx context.Context), shuffleHashChan chan *types.ShuffleData) *DposTaskManager
func (*DposTaskManager) GetCurrentDelegateByAddress ¶
func (taskManager *DposTaskManager) GetCurrentDelegateByAddress(coinbase string) *types.ShuffleDel
get coinbase shuffle info by address, only use by delegate node
func (*DposTaskManager) GetCurrentShuffleRound ¶
func (taskManager *DposTaskManager) GetCurrentShuffleRound() *types.ShuffleList
func (*DposTaskManager) GetLocalCurrentRound ¶
func (taskManager *DposTaskManager) GetLocalCurrentRound() []string
get all top delegatePeers in current node
func (*DposTaskManager) ShuffleWhenVerifyFail ¶
func (taskManager *DposTaskManager) ShuffleWhenVerifyFail(receiveBlockNumber int64, receiveBlockTime int64, shuffleBlockNumber *big.Int) error
shuffle to create new shuffleList when verify fail,only try one times.
type PeerInfo ¶
type PeerInfo struct { Version int `json:"version"` // eminer-pro protocol version negotiated Head string `json:"head"` // SHA3 hash of the peer's best owned block // contains filtered or unexported fields }
PeerInfo represents a short summary of the eminer-pro sub-protocol metadata known about a connected peer.
type PrivateAdminAPI ¶
type PrivateAdminAPI struct {
// contains filtered or unexported fields
}
PrivateAdminAPI is the collection of eminer-pro full node-related APIs exposed over the private admin endpoint.
func NewPrivateAdminAPI ¶
func NewPrivateAdminAPI(dac *Dacchain) *PrivateAdminAPI
NewPrivateAdminAPI creates a new API definition for the full node private admin methods of the eminer-pro service.
func (*PrivateAdminAPI) ExportChain ¶
func (api *PrivateAdminAPI) ExportChain(file string) (bool, error)
ExportChain exports the current blockchain into a local file.
func (*PrivateAdminAPI) ImportChain ¶
func (api *PrivateAdminAPI) ImportChain(file string) (bool, error)
ImportChain imports a blockchain from a local file.
type PrivateDebugAPI ¶
type PrivateDebugAPI struct {
// contains filtered or unexported fields
}
PrivateDebugAPI is the collection of eminer-pro full node APIs exposed over the private debugging endpoint.
func NewPrivateDebugAPI ¶
func NewPrivateDebugAPI(config *params.ChainConfig, dac *Dacchain) *PrivateDebugAPI
NewPrivateDebugAPI creates a new API definition for the full node-related private debug methods of the eminer-pro service.
func (*PrivateDebugAPI) GetBadBlocks ¶
func (api *PrivateDebugAPI) GetBadBlocks(ctx context.Context) ([]core.BadBlockArgs, error)
GetBadBLocks returns a list of the last 'bad blocks' that the client has seen on the network and returns them as a JSON list of block-hashes
func (*PrivateDebugAPI) GetModifiedAccountsByHash ¶
func (api *PrivateDebugAPI) GetModifiedAccountsByHash(startHash common.Hash, endHash *common.Hash) ([]common.Address, error)
GetModifiedAccountsByHash returns all accounts that have changed between the two blocks specified. A change is defined as a difference in nonce, balance, code hash, or storage hash.
With one parameter, returns the list of accounts modified in the specified block.
func (*PrivateDebugAPI) GetModifiedAccountsByNumber ¶
func (api *PrivateDebugAPI) GetModifiedAccountsByNumber(startNum uint64, endNum *uint64) ([]common.Address, error)
GetModifiedAccountsByumber returns all accounts that have changed between the two blocks specified. A change is defined as a difference in nonce, balance, code hash, or storage hash.
With one parameter, returns the list of accounts modified in the specified block.
func (*PrivateDebugAPI) GetTranTypeNum ¶
func (api *PrivateDebugAPI) GetTranTypeNum() interface{}
func (*PrivateDebugAPI) Preimage ¶
Preimage is a debug API function that returns the preimage for a sha3 hash, if known.
func (*PrivateDebugAPI) StorageRangeAt ¶
func (api *PrivateDebugAPI) StorageRangeAt(ctx context.Context, blockHash common.Hash, txIndex int, contractAddress common.Address, keyStart hexutil.Bytes, maxResult int) (StorageRangeResult, error)
StorageRangeAt returns the storage at the given block height and transaction index.
func (*PrivateDebugAPI) TraceBlock ¶
func (api *PrivateDebugAPI) TraceBlock(ctx context.Context, blob []byte, config *TraceConfig) ([]*txTraceResult, error)
TraceBlock returns the structured logs created during the execution of EVM and returns them as a JSON object.
func (*PrivateDebugAPI) TraceBlockByHash ¶
func (api *PrivateDebugAPI) TraceBlockByHash(ctx context.Context, hash common.Hash, config *TraceConfig) ([]*txTraceResult, error)
TraceBlockByHash returns the structured logs created during the execution of EVM and returns them as a JSON object.
func (*PrivateDebugAPI) TraceBlockByNumber ¶
func (api *PrivateDebugAPI) TraceBlockByNumber(ctx context.Context, number rpc.BlockNumber, config *TraceConfig) ([]*txTraceResult, error)
TraceBlockByNumber returns the structured logs created during the execution of EVM and returns them as a JSON object.
func (*PrivateDebugAPI) TraceBlockFromFile ¶
func (api *PrivateDebugAPI) TraceBlockFromFile(ctx context.Context, file string, config *TraceConfig) ([]*txTraceResult, error)
TraceBlockFromFile returns the structured logs created during the execution of EVM and returns them as a JSON object.
func (*PrivateDebugAPI) TraceChain ¶
func (api *PrivateDebugAPI) TraceChain(ctx context.Context, start, end rpc.BlockNumber, config *TraceConfig) (*rpc.Subscription, error)
TraceChain returns the structured logs created during the execution of EVM between two blocks (excluding start) and returns them as a JSON object.
func (*PrivateDebugAPI) TraceTransaction ¶
func (api *PrivateDebugAPI) TraceTransaction(ctx context.Context, hash common.Hash, config *TraceConfig) (interface{}, error)
TraceTransaction returns the structured logs created during the execution of EVM and returns them as a JSON object.
type ProtocolManager ¶
type ProtocolManager struct { SubProtocols []p2p.Protocol // contains filtered or unexported fields }
func NewProtocolManager ¶
func NewProtocolManager(config *params.ChainConfig, mode downloader.SyncMode, networkId uint64, txpool txPool, engine consensus.Engine, blockchain *core.BlockChain, chaindb aoadb.Database, taskManager *DposTaskManager, blockChan chan *types.Block, addDelegateWalletCallback func(data *aa.DelegateWalletInfo), delegateWallets map[string]*ecdsa.PrivateKey) (*ProtocolManager, error)
NewProtocolManager returns a new dacchain sub protocol manager. The dacchain sub protocol manages peers capable with the dacchain network.
func (*ProtocolManager) BroadcastBlock ¶
func (pm *ProtocolManager) BroadcastBlock(block *types.Block, propagate bool)
BroadcastBlock will either propagate a block to a subset of it's peers, or will only announce it's availability (depending what's requested).
func (*ProtocolManager) BroadcastBlockSignatures ¶
func (pm *ProtocolManager) BroadcastBlockSignatures(blockHash []byte, signs []types.VoteSign)
func (*ProtocolManager) BroadcastCommitBlock ¶
func (pm *ProtocolManager) BroadcastCommitBlock(block types.CommitBlock)
Broadcast commit block
func (*ProtocolManager) BroadcastTx ¶
func (pm *ProtocolManager) BroadcastTx(hash common.Hash, tx *types.Transaction)
BroadcastTx will propagate a transaction to all peers which are not known to already have the given transaction.
func (*ProtocolManager) GetAddDelegateWalletCallback ¶
func (pm *ProtocolManager) GetAddDelegateWalletCallback() func(data *aa.DelegateWalletInfo)
func (*ProtocolManager) NodeInfo ¶
func (pm *ProtocolManager) NodeInfo() *NodeInfo
NodeInfo retrieves some protocol metadata about the running host node.
func (*ProtocolManager) PreBroadcastBlock ¶
func (pm *ProtocolManager) PreBroadcastBlock(block *types.Block)
broadcast to agent p2p network
func (*ProtocolManager) Start ¶
func (pm *ProtocolManager) Start(maxPeers int)
func (*ProtocolManager) Stop ¶
func (pm *ProtocolManager) Stop()
type PublicDebugAPI ¶
type PublicDebugAPI struct {
// contains filtered or unexported fields
}
PublicDebugAPI is the collection of eminer-pro full node APIs exposed over the public debugging endpoint.
func NewPublicDebugAPI ¶
func NewPublicDebugAPI(dac *Dacchain) *PublicDebugAPI
NewPublicDebugAPI creates a new API definition for the full node- related public debug methods of the eminer-pro service.
func (*PublicDebugAPI) DumpBlock ¶
func (api *PublicDebugAPI) DumpBlock(blockNr rpc.BlockNumber) (state.Dump, error)
DumpBlock retrieves the entire state of the database at a given block.
type StorageRangeResult ¶
type StorageRangeResult struct { Storage storageMap `json:"storage"` NextKey *common.Hash `json:"nextKey"` // nil if Storage includes the last key in the trie. }
StorageRangeResult is the result of a debug_storageRangeAt API call.
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package downloader contains the manual full chain synchronisation.
|
Package downloader contains the manual full chain synchronisation. |
Package fetcher contains the block announcement based synchronisation.
|
Package fetcher contains the block announcement based synchronisation. |
Package filters implements an dacchain filtering system for block, transactions and log events.
|
Package filters implements an dacchain filtering system for block, transactions and log events. |
Package tracers is a collection of JavaScript transaction tracers.
|
Package tracers is a collection of JavaScript transaction tracers. |
internal/tracers
Package tracers contains the actual JavaScript tracer assets.
|
Package tracers contains the actual JavaScript tracer assets. |