Documentation ¶
Index ¶
- func NewEthConfig(ctx *cli.Context, stack *node.Node) *eth.Config
- func NewNodeConfig(ctx *cli.Context) *node.Config
- type Backend
- func (b *Backend) APIs() []rpc.API
- func (b *Backend) AccumulateRewards(strategy *emtTypes.Strategy)
- func (b *Backend) BroadcastTx(tx *ethTypes.Transaction) error
- func (b *Backend) BroadcastTxSync(tx tmTypes.Tx) (*ctypes.ResultBroadcastTx, error)
- func (b *Backend) CachedTxInfo() map[common.Hash]ethTypes.TxInfo
- func (b *Backend) Commit() (common.Hash, error)
- func (b *Backend) Config() *eth.Config
- func (b *Backend) CurrentTxInfo() ethTypes.TxInfo
- func (b *Backend) DeleteCachedTxInfo(txHash common.Hash)
- func (b *Backend) DeliverTx(tx *ethTypes.Transaction, appVerion uint64, txInfo ethTypes.TxInfo) abciTypes.ResponseDeliverTx
- func (b *Backend) Es() *EthState
- func (b *Backend) Ethereum() *eth.Ethereum
- func (b *Backend) FetchCachedTxInfo(txHash common.Hash) (ethTypes.TxInfo, bool)
- func (b *Backend) GasLimit() uint64
- func (b *Backend) InitEthState(receiver common.Address) error
- func (b *Backend) InitReceiver() string
- func (b *Backend) InsertCachedTxInfo(txHash common.Hash, txInfo ethTypes.TxInfo)
- func (b *Backend) MemPool() mempl.Mempool
- func (b *Backend) Protocols() []p2p.Protocol
- func (b *Backend) SetMemPool(memPool mempl.Mempool)
- func (b *Backend) Start(_ *p2p.Server) error
- func (b *Backend) Stop() error
- func (b *Backend) UpdateHeaderWithTimeInfo(tmHeader *abciTypes.Header)
- type ChainError
- type EthState
- func (es *EthState) AccumulateRewards(strategy *emtTypes.Strategy)
- func (es *EthState) Commit() (common.Hash, error)
- func (es *EthState) DeliverTx(tx *ethTypes.Transaction, appVersion uint64, txInfo ethTypes.TxInfo) abciTypes.ResponseDeliverTx
- func (es *EthState) GasLimit() uint64
- func (es *EthState) Pending() (*ethTypes.Block, *state.StateDB)
- func (es *EthState) ResetWorkState(receiver common.Address) error
- func (es *EthState) SetEthConfig(ethConfig *eth.Config)
- func (es *EthState) SetEthereum(ethereum *eth.Ethereum)
- func (es *EthState) State() (*state.StateDB, error)
- func (es *EthState) UpdateHeaderCoinbase(coinbase common.Address)
- func (es *EthState) UpdateHeaderWithTimeInfo(config *params.ChainConfig, parentTime uint64, numTx uint64)
- func (es *EthState) WorkState() workState
- type NetRPCService
- type Node
- type NullBlockProcessor
- type TxFrom
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewEthConfig ¶
NewEthConfig for the ethereum services #unstable
func NewNodeConfig ¶
NewNodeConfig for p2p and network layer #unstable
Types ¶
type Backend ¶
type Backend struct {
// contains filtered or unexported fields
}
Backend handles the chain database and VM #stable - 0.4.0
func NewBackend ¶
func NewBackend(ctx *node.ServiceContext, ethConfig *eth.Config, client rpcClient.HTTPClient) (*Backend, error)
NewBackend creates a new Backend #stable - 0.4.0
func (*Backend) APIs ¶
APIs returns the collection of RPC services the ethereum package offers. #stable - 0.4.0
func (*Backend) AccumulateRewards ¶
AccumulateRewards accumulates the rewards based on the given strategy #unstable
func (*Backend) BroadcastTx ¶
func (b *Backend) BroadcastTx(tx *ethTypes.Transaction) error
BroadcastTx broadcasts a transaction to tendermint core #unstable
func (*Backend) BroadcastTxSync ¶
func (*Backend) CachedTxInfo ¶ added in v1.4.5
func (*Backend) CurrentTxInfo ¶ added in v1.4.5
func (*Backend) DeleteCachedTxInfo ¶ added in v1.4.5
func (*Backend) DeliverTx ¶
func (b *Backend) DeliverTx(tx *ethTypes.Transaction, appVerion uint64, txInfo ethTypes.TxInfo) abciTypes.ResponseDeliverTx
DeliverTx appends a transaction to the current block #stable
func (*Backend) FetchCachedTxInfo ¶ added in v1.4.5
func (*Backend) InitEthState ¶
InitEthState initializes the EthState #unstable
func (*Backend) InitReceiver ¶
func (*Backend) InsertCachedTxInfo ¶ added in v1.4.5
func (*Backend) Protocols ¶
Protocols implements node.Service, returning all the currently configured network protocols to start. #stable
func (*Backend) SetMemPool ¶
func (*Backend) Start ¶
Start implements node.Service, starting all internal goroutines needed by the Ethereum protocol implementation. #stable
func (*Backend) Stop ¶
Stop implements node.Service, terminating all internal goroutines used by the Ethereum protocol. #stable
func (*Backend) UpdateHeaderWithTimeInfo ¶
UpdateHeaderWithTimeInfo uses the tendermint header to update the ethereum header #unstable
type ChainError ¶
type ChainError struct { ErrorCode int // Describes the kind of error Description string // Human readable description of the issue }
func (ChainError) Error ¶
func (e ChainError) Error() string
Error satisfies the error interface and prints human-readable errors.
type EthState ¶
type EthState struct {
// contains filtered or unexported fields
}
func NewEthState ¶
func NewEthState() *EthState
After NewEthState, call SetEthereum and SetEthConfig.
func (*EthState) AccumulateRewards ¶
Accumulate validator rewards.
func (*EthState) DeliverTx ¶
func (es *EthState) DeliverTx(tx *ethTypes.Transaction, appVersion uint64, txInfo ethTypes.TxInfo) abciTypes.ResponseDeliverTx
Execute the transaction.
func (*EthState) Pending ¶
Return a new block and a copy of the state from the latest work. #unstable
func (*EthState) SetEthConfig ¶
func (*EthState) SetEthereum ¶
func (*EthState) UpdateHeaderCoinbase ¶
func (*EthState) UpdateHeaderWithTimeInfo ¶
func (es *EthState) UpdateHeaderWithTimeInfo( config *params.ChainConfig, parentTime uint64, numTx uint64)
type NetRPCService ¶
type NetRPCService struct {
// contains filtered or unexported fields
}
NetRPCService mirrors the implementation of `internal/ethapi` #unstable
func NewNetRPCService ¶
func NewNetRPCService(networkVersion uint64) *NetRPCService
NewNetRPCService creates a new net API instance. #unstable
func (*NetRPCService) Listening ¶
func (n *NetRPCService) Listening() bool
Listening returns an indication if the node is listening for network connections. #unstable
func (*NetRPCService) PeerCount ¶
func (n *NetRPCService) PeerCount() hexutil.Uint
PeerCount returns the number of connected peers #unstable
func (*NetRPCService) Version ¶
func (n *NetRPCService) Version() string
Version returns the current ethereum protocol version. #unstable
type NullBlockProcessor ¶
type NullBlockProcessor struct{}
NullBlockProcessor does not validate anything #unstable
func (*NullBlockProcessor) ValidateBody ¶
func (v *NullBlockProcessor) ValidateBody(block *ethTypes.Block) error
ValidateBody does not validate anything #unstable