Documentation ¶
Index ¶
- Constants
- Variables
- func CreateConsensusEngine(ctx *node.ServiceContext, config *Config, chainConfig *params.ChainConfig, ...) consensus.Tendermint
- func NewBloomIndexer(db ligodb.Database, size uint64) *core.ChainIndexer
- type BloomIndexer
- type Config
- type EthApiBackend
- 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) BroadcastTX3ProofData(proofData *types.TX3ProofData)
- func (b *EthApiBackend) ChainConfig() *params.ChainConfig
- func (b *EthApiBackend) ChainDb() ligodb.Database
- func (b *EthApiBackend) CurrentBlock() *types.Block
- func (b *EthApiBackend) Downloader() *downloader.Downloader
- func (b *EthApiBackend) Engine() consensus.Engine
- func (b *EthApiBackend) EventMux() *event.TypeMux
- func (b *EthApiBackend) GetBlock(ctx context.Context, hash common.Hash) (*types.Block, error)
- func (b *EthApiBackend) GetCrossChainHelper() core.CrossChainHelper
- 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) (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) 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) 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) SubscribeRemovedLogsEvent(ch chan<- core.RemovedLogsEvent) event.Subscription
- func (b *EthApiBackend) SubscribeTxPreEvent(ch chan<- core.TxPreEvent) 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 LesServer
- type LigoAI
- func (s *LigoAI) APIs() []rpc.API
- func (s *LigoAI) AccountManager() *accounts.Manager
- func (s *LigoAI) BlockChain() *core.BlockChain
- func (s *LigoAI) ChainConfig() *params.ChainConfig
- func (s *LigoAI) ChainDb() ligodb.Database
- func (s *LigoAI) Coinbase() (eb common.Address, err error)
- func (s *LigoAI) Downloader() *downloader.Downloader
- func (s *LigoAI) Engine() consensus.Tendermint
- func (s *LigoAI) EthVersion() int
- func (s *LigoAI) EventMux() *event.TypeMux
- func (s *LigoAI) IsListening() bool
- func (s *LigoAI) IsMining() bool
- func (s *LigoAI) Miner() *miner.Miner
- func (s *LigoAI) NetVersion() uint64
- func (s *LigoAI) Protocols() []p2p.Protocol
- func (s *LigoAI) ResetWithGenesisBlock(gb *types.Block)
- func (self *LigoAI) SetCoinbase(coinbase common.Address)
- func (s *LigoAI) Start(srvr *p2p.Server) error
- func (s *LigoAI) StartMining(local bool) error
- func (s *LigoAI) StartScanAndPrune(blockNumber uint64)
- func (s *LigoAI) Stop() error
- func (s *LigoAI) StopMining()
- func (s *LigoAI) TxPool() *core.TxPool
- type NodeInfo
- type PeerInfo
- type PrivateAdminAPI
- type PrivateDebugAPI
- func (api *PrivateDebugAPI) BroadcastRawDBNode(ctx context.Context, hash common.Hash) (map[string]error, error)
- func (api *PrivateDebugAPI) BrokenPreimage(ctx context.Context, hash common.Hash, preimage hexutil.Bytes) (hexutil.Bytes, error)
- func (api *PrivateDebugAPI) FindBadPreimage(ctx context.Context) (interface{}, error)
- 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) PrintTrieNode(ctx context.Context, root common.Hash) ([]resultNode, error)
- func (api *PrivateDebugAPI) ReadRawDBNode(ctx context.Context, hash common.Hash) (hexutil.Bytes, error)
- func (api *PrivateDebugAPI) RemotePreimage(ctx context.Context, hash common.Hash) (hexutil.Bytes, error)
- func (api *PrivateDebugAPI) RemovePreimage(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
- type ProtocolManager
- func (pm *ProtocolManager) BroadcastBlock(block *types.Block, propagate bool)
- func (pm *ProtocolManager) BroadcastMessage(msgcode uint64, data interface{})
- func (pm *ProtocolManager) BroadcastTX3ProofData(hash common.Hash, proofData *types.TX3ProofData)
- func (pm *ProtocolManager) BroadcastTx(hash common.Hash, tx *types.Transaction)
- func (pm *ProtocolManager) Enqueue(id string, block *types.Block)
- func (self *ProtocolManager) FindPeers(targets map[common.Address]bool) map[common.Address]consensus.Peer
- func (self *ProtocolManager) NodeInfo() *NodeInfo
- func (pm *ProtocolManager) Start(maxPeers int)
- func (pm *ProtocolManager) Stop()
- func (pm *ProtocolManager) TryFixBadPreimages()
- type PublicDebugAPI
- type PublicEthereumAPI
- type PublicMinerAPI
- type StdTraceConfig
- type StorageRangeResult
- type TraceConfig
Constants ¶
View Source
const ( StatusMsg = 0x00 NewBlockHashesMsg = 0x01 TxMsg = 0x02 GetBlockHeadersMsg = 0x03 BlockHeadersMsg = 0x04 GetBlockBodiesMsg = 0x05 BlockBodiesMsg = 0x06 NewBlockMsg = 0x07 GetNodeDataMsg = 0x0d NodeDataMsg = 0x0e GetReceiptsMsg = 0x0f ReceiptsMsg = 0x10 TX3ProofDataMsg = 0x18 GetPreImagesMsg = 0x19 PreImagesMsg = 0x1a TrieNodeDataMsg = 0x1b )
View Source
const ( ErrMsgTooLarge = iota ErrDecode ErrInvalidMsgCode ErrProtocolVersionMismatch ErrNetworkIdMismatch ErrGenesisBlockMismatch ErrNoStatusMsg ErrExtraStatusMsg ErrSuspendedPeer ErrTX3ValidateFail )
View Source
const ProtocolMaxMsgSize = 10 * 1024 * 1024
Variables ¶
View Source
var DefaultConfig = Config{ SyncMode: downloader.FullSync, NetworkId: 9910, DatabaseCache: 512, TrieCleanCache: 256, TrieDirtyCache: 256, TrieTimeout: 60 * time.Minute, MinerGasFloor: 120000000, MinerGasCeil: 120000000, MinerGasPrice: big.NewInt(params.GWei), TxPool: core.DefaultTxPoolConfig, GPO: gasprice.Config{ Blocks: 20, Percentile: 60, }, }
View Source
var ProtocolVersions = []uint{intprotocol65, intprotocol64, intprotocol63}
Functions ¶
func CreateConsensusEngine ¶
func CreateConsensusEngine(ctx *node.ServiceContext, config *Config, chainConfig *params.ChainConfig, db ligodb.Database, cliCtx *cli.Context, cch core.CrossChainHelper) consensus.Tendermint
func NewBloomIndexer ¶
func NewBloomIndexer(db ligodb.Database, size uint64) *core.ChainIndexer
Types ¶
type BloomIndexer ¶
type BloomIndexer struct {
// contains filtered or unexported fields
}
func (*BloomIndexer) Commit ¶
func (b *BloomIndexer) Commit() error
func (*BloomIndexer) Process ¶
func (b *BloomIndexer) Process(header *types.Header)
type Config ¶
type Config struct { Genesis *core.Genesis `toml:",omitempty"` NetworkId uint64 SyncMode downloader.SyncMode NoPruning bool SkipBcVersionCheck bool `toml:"-"` DatabaseHandles int `toml:"-"` DatabaseCache int TrieCleanCache int TrieDirtyCache int TrieTimeout time.Duration Coinbase common.Address `toml:",omitempty"` ExtraData []byte `toml:",omitempty"` MinerGasFloor uint64 MinerGasCeil uint64 MinerGasPrice *big.Int SolcPath string TxPool core.TxPoolConfig GPO gasprice.Config EnablePreimageRecording bool Tendermint tendermint.Config DocRoot string `toml:"-"` PruneStateData bool PruneBlockData bool }
func (Config) MarshalTOML ¶
func (*Config) UnmarshalTOML ¶
type EthApiBackend ¶
type EthApiBackend struct {
// contains filtered or unexported fields
}
func (*EthApiBackend) AccountManager ¶
func (b *EthApiBackend) AccountManager() *accounts.Manager
func (*EthApiBackend) BlockByNumber ¶
func (b *EthApiBackend) BlockByNumber(ctx context.Context, blockNr rpc.BlockNumber) (*types.Block, error)
func (*EthApiBackend) BloomStatus ¶
func (b *EthApiBackend) BloomStatus() (uint64, uint64)
func (*EthApiBackend) BroadcastTX3ProofData ¶
func (b *EthApiBackend) BroadcastTX3ProofData(proofData *types.TX3ProofData)
func (*EthApiBackend) ChainConfig ¶
func (b *EthApiBackend) ChainConfig() *params.ChainConfig
func (*EthApiBackend) ChainDb ¶
func (b *EthApiBackend) ChainDb() ligodb.Database
func (*EthApiBackend) CurrentBlock ¶
func (b *EthApiBackend) CurrentBlock() *types.Block
func (*EthApiBackend) Downloader ¶
func (b *EthApiBackend) Downloader() *downloader.Downloader
func (*EthApiBackend) Engine ¶
func (b *EthApiBackend) Engine() consensus.Engine
func (*EthApiBackend) EventMux ¶
func (b *EthApiBackend) EventMux() *event.TypeMux
func (*EthApiBackend) GetCrossChainHelper ¶
func (b *EthApiBackend) GetCrossChainHelper() core.CrossChainHelper
func (*EthApiBackend) GetPoolNonce ¶
func (*EthApiBackend) GetPoolTransaction ¶
func (b *EthApiBackend) GetPoolTransaction(hash common.Hash) *types.Transaction
func (*EthApiBackend) GetPoolTransactions ¶
func (b *EthApiBackend) GetPoolTransactions() (types.Transactions, error)
func (*EthApiBackend) GetReceipts ¶
func (*EthApiBackend) HeaderByNumber ¶
func (b *EthApiBackend) HeaderByNumber(ctx context.Context, blockNr rpc.BlockNumber) (*types.Header, error)
func (*EthApiBackend) ProtocolVersion ¶
func (b *EthApiBackend) ProtocolVersion() int
func (*EthApiBackend) SendTx ¶
func (b *EthApiBackend) SendTx(ctx context.Context, signedTx *types.Transaction) error
func (*EthApiBackend) ServiceFilter ¶
func (b *EthApiBackend) ServiceFilter(ctx context.Context, session *bloombits.MatcherSession)
func (*EthApiBackend) SetHead ¶
func (b *EthApiBackend) SetHead(number uint64)
func (*EthApiBackend) StateAndHeaderByNumber ¶
func (b *EthApiBackend) StateAndHeaderByNumber(ctx context.Context, blockNr rpc.BlockNumber) (*state.StateDB, *types.Header, error)
func (*EthApiBackend) Stats ¶
func (b *EthApiBackend) Stats() (pending int, queued int)
func (*EthApiBackend) SubscribeChainEvent ¶
func (b *EthApiBackend) SubscribeChainEvent(ch chan<- core.ChainEvent) event.Subscription
func (*EthApiBackend) SubscribeChainHeadEvent ¶
func (b *EthApiBackend) SubscribeChainHeadEvent(ch chan<- core.ChainHeadEvent) event.Subscription
func (*EthApiBackend) SubscribeChainSideEvent ¶
func (b *EthApiBackend) SubscribeChainSideEvent(ch chan<- core.ChainSideEvent) event.Subscription
func (*EthApiBackend) SubscribeLogsEvent ¶
func (b *EthApiBackend) SubscribeLogsEvent(ch chan<- []*types.Log) event.Subscription
func (*EthApiBackend) SubscribeRemovedLogsEvent ¶
func (b *EthApiBackend) SubscribeRemovedLogsEvent(ch chan<- core.RemovedLogsEvent) event.Subscription
func (*EthApiBackend) SubscribeTxPreEvent ¶
func (b *EthApiBackend) SubscribeTxPreEvent(ch chan<- core.TxPreEvent) event.Subscription
func (*EthApiBackend) SuggestPrice ¶
func (*EthApiBackend) TxPoolContent ¶
func (b *EthApiBackend) TxPoolContent() (map[common.Address]types.Transactions, map[common.Address]types.Transactions)
type LigoAI ¶
type LigoAI struct { ApiBackend *EthApiBackend // contains filtered or unexported fields }
func New ¶
func New(ctx *node.ServiceContext, config *Config, cliCtx *cli.Context, cch core.CrossChainHelper, logger log.Logger, isTestnet bool) (*LigoAI, error)
func (*LigoAI) AccountManager ¶
func (*LigoAI) BlockChain ¶
func (s *LigoAI) BlockChain() *core.BlockChain
func (*LigoAI) ChainConfig ¶
func (s *LigoAI) ChainConfig() *params.ChainConfig
func (*LigoAI) Downloader ¶
func (s *LigoAI) Downloader() *downloader.Downloader
func (*LigoAI) Engine ¶
func (s *LigoAI) Engine() consensus.Tendermint
func (*LigoAI) EthVersion ¶
func (*LigoAI) IsListening ¶
func (*LigoAI) NetVersion ¶
func (*LigoAI) ResetWithGenesisBlock ¶
func (*LigoAI) SetCoinbase ¶
func (*LigoAI) StartMining ¶
func (*LigoAI) StartScanAndPrune ¶
func (*LigoAI) StopMining ¶
func (s *LigoAI) StopMining()
type PrivateAdminAPI ¶
type PrivateAdminAPI struct {
// contains filtered or unexported fields
}
func NewPrivateAdminAPI ¶
func NewPrivateAdminAPI(eth *LigoAI) *PrivateAdminAPI
func (*PrivateAdminAPI) ExportChain ¶
func (api *PrivateAdminAPI) ExportChain(file string) (bool, error)
func (*PrivateAdminAPI) ImportChain ¶
func (api *PrivateAdminAPI) ImportChain(file string) (bool, error)
func (*PrivateAdminAPI) LatestPruneState ¶
func (api *PrivateAdminAPI) LatestPruneState() (*datareduction.PruneStatus, error)
func (*PrivateAdminAPI) PruneStateData ¶
func (api *PrivateAdminAPI) PruneStateData(height *hexutil.Uint64) (bool, error)
type PrivateDebugAPI ¶
type PrivateDebugAPI struct {
// contains filtered or unexported fields
}
func NewPrivateDebugAPI ¶
func NewPrivateDebugAPI(config *params.ChainConfig, eth *LigoAI) *PrivateDebugAPI
func (*PrivateDebugAPI) BroadcastRawDBNode ¶
func (*PrivateDebugAPI) BrokenPreimage ¶
func (*PrivateDebugAPI) FindBadPreimage ¶
func (api *PrivateDebugAPI) FindBadPreimage(ctx context.Context) (interface{}, error)
func (*PrivateDebugAPI) GetBadBlocks ¶
func (api *PrivateDebugAPI) GetBadBlocks(ctx context.Context) ([]core.BadBlockArgs, error)
func (*PrivateDebugAPI) GetModifiedAccountsByHash ¶
func (*PrivateDebugAPI) GetModifiedAccountsByNumber ¶
func (*PrivateDebugAPI) PrintTrieNode ¶
func (*PrivateDebugAPI) ReadRawDBNode ¶
func (*PrivateDebugAPI) RemotePreimage ¶
func (*PrivateDebugAPI) RemovePreimage ¶
func (*PrivateDebugAPI) StorageRangeAt ¶
func (*PrivateDebugAPI) TraceBlock ¶
func (api *PrivateDebugAPI) TraceBlock(ctx context.Context, blob []byte, config *TraceConfig) ([]*txTraceResult, error)
func (*PrivateDebugAPI) TraceBlockByHash ¶
func (api *PrivateDebugAPI) TraceBlockByHash(ctx context.Context, hash common.Hash, config *TraceConfig) ([]*txTraceResult, error)
func (*PrivateDebugAPI) TraceBlockByNumber ¶
func (api *PrivateDebugAPI) TraceBlockByNumber(ctx context.Context, number rpc.BlockNumber, config *TraceConfig) ([]*txTraceResult, error)
func (*PrivateDebugAPI) TraceBlockFromFile ¶
func (api *PrivateDebugAPI) TraceBlockFromFile(ctx context.Context, file string, config *TraceConfig) ([]*txTraceResult, error)
func (*PrivateDebugAPI) TraceChain ¶
func (api *PrivateDebugAPI) TraceChain(ctx context.Context, start, end rpc.BlockNumber, config *TraceConfig) (*rpc.Subscription, error)
func (*PrivateDebugAPI) TraceTransaction ¶
func (api *PrivateDebugAPI) TraceTransaction(ctx context.Context, hash common.Hash, config *TraceConfig) (interface{}, error)
type PrivateMinerAPI ¶
type PrivateMinerAPI struct {
// contains filtered or unexported fields
}
func NewPrivateMinerAPI ¶
func NewPrivateMinerAPI(e *LigoAI) *PrivateMinerAPI
func (*PrivateMinerAPI) SetCoinbase ¶
func (api *PrivateMinerAPI) SetCoinbase(coinbase common.Address) bool
func (*PrivateMinerAPI) SetGasPrice ¶
func (api *PrivateMinerAPI) SetGasPrice(gasPrice hexutil.Big) bool
func (*PrivateMinerAPI) Start ¶
func (api *PrivateMinerAPI) Start(threads *int) error
func (*PrivateMinerAPI) Stop ¶
func (api *PrivateMinerAPI) Stop() bool
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, mux *event.TypeMux, txpool txPool, engine consensus.Engine, blockchain *core.BlockChain, chaindb ligodb.Database, cch core.CrossChainHelper) (*ProtocolManager, error)
func (*ProtocolManager) BroadcastBlock ¶
func (pm *ProtocolManager) BroadcastBlock(block *types.Block, propagate bool)
func (*ProtocolManager) BroadcastMessage ¶
func (pm *ProtocolManager) BroadcastMessage(msgcode uint64, data interface{})
func (*ProtocolManager) BroadcastTX3ProofData ¶
func (pm *ProtocolManager) BroadcastTX3ProofData(hash common.Hash, proofData *types.TX3ProofData)
func (*ProtocolManager) BroadcastTx ¶
func (pm *ProtocolManager) BroadcastTx(hash common.Hash, tx *types.Transaction)
func (*ProtocolManager) NodeInfo ¶
func (self *ProtocolManager) NodeInfo() *NodeInfo
func (*ProtocolManager) Start ¶
func (pm *ProtocolManager) Start(maxPeers int)
func (*ProtocolManager) Stop ¶
func (pm *ProtocolManager) Stop()
func (*ProtocolManager) TryFixBadPreimages ¶
func (pm *ProtocolManager) TryFixBadPreimages()
type PublicDebugAPI ¶
type PublicDebugAPI struct {
// contains filtered or unexported fields
}
func NewPublicDebugAPI ¶
func NewPublicDebugAPI(eth *LigoAI) *PublicDebugAPI
func (*PublicDebugAPI) DumpBlock ¶
func (api *PublicDebugAPI) DumpBlock(blockNr rpc.BlockNumber) (state.Dump, error)
type PublicEthereumAPI ¶
type PublicEthereumAPI struct {
// contains filtered or unexported fields
}
func NewPublicEthereumAPI ¶
func NewPublicEthereumAPI(e *LigoAI) *PublicEthereumAPI
func (*PublicEthereumAPI) Coinbase ¶
func (api *PublicEthereumAPI) Coinbase() (string, error)
func (*PublicEthereumAPI) Etherbase ¶
func (api *PublicEthereumAPI) Etherbase() (string, error)
type PublicMinerAPI ¶
type PublicMinerAPI struct {
// contains filtered or unexported fields
}
func NewPublicMinerAPI ¶
func NewPublicMinerAPI(e *LigoAI) *PublicMinerAPI
func (*PublicMinerAPI) GetWork ¶
func (api *PublicMinerAPI) GetWork() ([3]string, error)
func (*PublicMinerAPI) Mining ¶
func (api *PublicMinerAPI) Mining() bool
func (*PublicMinerAPI) SubmitHashrate ¶
func (*PublicMinerAPI) SubmitWork ¶
func (api *PublicMinerAPI) SubmitWork(nonce types.BlockNonce, solution, digest common.Hash) bool
type StdTraceConfig ¶
type StorageRangeResult ¶
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
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. |
Click to show internal directories.
Click to hide internal directories.