Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseConfig ¶
type BaseConfig struct {
//Top-level directory of evm data
DataDir string `mapstructure:"datadir"`
//Debug, info, warn, error, fatal, panic
LogLevel string `mapstructure:"log_level"`
}
BaseConfig contains the top level configuration for an EVM node
func DefaultBaseConfig ¶
func DefaultBaseConfig() BaseConfig
DefaultBaseConfig returns the default top-level configuration for EVM
type Config ¶
type Config struct {
//Top level options use an anonymous struct
BaseConfig `mapstructure:",squash"`
//Options for EVM and State
Eth *EthConfig `mapstructure:"eth"`
//Options for Lachesis
Lachesis *LachesisConfig `mapstructure:"lachesis"`
}
Config contains the configuration for an EVM node
func DefaultConfig ¶
func DefaultConfig() *Config
DefaultConfig returns the default configuration for an EVM node
type EthConfig ¶
type EthConfig struct {
//Genesis file
Genesis string `mapstructure:"genesis"`
//Location of ethereum account keys
Keystore string `mapstructure:"keystore"`
//File containing passwords to unlock ethereum accounts
PwdFile string `mapstructure:"pwd"`
//File containing the levelDB database
DbFile string `mapstructure:"db"`
//Address of HTTP API Service
EthAPIAddr string `mapstructure:"api_addr"`
//Megabytes of memory allocated to internal caching (min 16MB / database forced)
Cache int `mapstructure:"cache"`
}
EthConfig contains the configuration relative to the accounts, EVM, trie/db, and service API
func DefaultEthConfig ¶
func DefaultEthConfig() *EthConfig
DefaultEthConfig return the default configuration for Eth services
type InmemEngine ¶
type InmemEngine struct {
// contains filtered or unexported fields
}
func NewInmemEngine ¶
func NewInmemEngine(config Config, logger *logrus.Logger) (*InmemEngine, error)
func (*InmemEngine) Run ¶
func (i *InmemEngine) Run() error
type InmemProxy ¶
type InmemProxy struct {
// contains filtered or unexported fields
}
InmemProxy implements the AppProxy interface
func NewInmemProxy ¶
func NewInmemProxy(state *state.State, service *service.Service, submitCh chan []byte, logger *logrus.Logger) *InmemProxy
NewInmemProxy initializes and return a new InmemProxy
func (*InmemProxy) CommitBlock ¶
func (i *InmemProxy) CommitBlock(block poset.Block) ([]byte, error)
CommitBlock commits Block to the State and expects the resulting state hash
func (*InmemProxy) GetSnapshot ¶
func (i *InmemProxy) GetSnapshot(blockIndex int) ([]byte, error)
TODO - Implement these two functions
func (*InmemProxy) Restore ¶
func (i *InmemProxy) Restore(snapshot []byte) error
func (*InmemProxy) SubmitCh ¶
func (i *InmemProxy) SubmitCh() chan []byte
SubmitCh is the channel through which the Service sends transactions to the node.
type LachesisConfig ¶
type LachesisConfig struct {
//Address of Lachesis proxy
ProxyAddr string `mapstructure:"proxy_addr"`
//Address of Lachesis client proxy
ClientAddr string `mapstructure:"client_addr"`
//Directory containing priv_key.pem and peers.json files
Dir string `mapstructure:"dir"`
//Address of Lachesis node (where it talks to other Lachesis nodes)
NodeAddr string `mapstructure:"node_addr"`
//Lachesis HTTP API address
APIAddr string `mapstructure:"api_addr"`
//Gossip heartbeat in milliseconds
Heartbeat int `mapstructure:"heartbeat"`
//TCP timeout in milliseconds
TCPTimeout int `mapstructure:"tcp_timeout"`
//Max number of items in caches
CacheSize int `mapstructure:"cache_size"`
//Max number of Event in SyncResponse
SyncLimit int `mapstructure:"sync_limit"`
//Max number of connections in net pool
MaxPool int `mapstructure:"max_pool"`
//Database type; badger or inmeum
StoreType string `mapstructure:"store_type"`
//If StoreType = badger, location of database file
StorePath string `mapstructure:"store_path"`
}
LachesisConfig contains the configuration of a Lachesis node
func DefaultLachesisConfig ¶
func DefaultLachesisConfig() *LachesisConfig
DefaultLachesisConfig returns the default configuration for a Lachesis node
type SocketEngine ¶
type SocketEngine struct {
// contains filtered or unexported fields
}
func NewSocketEngine ¶
func NewSocketEngine(config Config, logger *logrus.Logger) (*SocketEngine, error)
func (*SocketEngine) Run ¶
func (s *SocketEngine) Run() error