Documentation
¶
Index ¶
- Variables
- func CloseMockServer(server *Server)
- func ConvertBloomToProtoBloom(bloom types.Bloom) *protobor.Bloom
- func ConvertLogsToProtoLogs(logs []*types.Log) []*protobor.Log
- func ConvertReceiptToProtoReceipt(receipt *types.Receipt) *protobor.Receipt
- func ConvertTopicsToProtoTopics(topics []common.Hash) []*protocommon.H256
- func DefaultDataDir() string
- func Hostname() string
- func MakeDatabaseHandles(max int) (int, error)
- func MakePasswordListFromFile(path string) ([]string, error)
- func PeerInfoToPeer(info *p2p.PeerInfo) *proto.Peer
- func VerbosityIntToString(verbosity int) string
- func VerbosityStringToInt(loglevel string) int
- func WithGRPCAddress() serverOption
- func WithGRPCListener(lis net.Listener) serverOption
- type APIConfig
- type AUTHConfig
- type AccountsConfig
- type CacheConfig
- type Command
- type Config
- type DeveloperConfig
- type ExtraDBConfig
- type GRPCConfig
- type GpoConfig
- type HarmoniaConfig
- type HttpTimeouts
- type InfluxDBConfig
- type JsonRPCConfig
- type LoggingConfig
- type P2PConfig
- type P2PDiscovery
- type ParallelEVMConfig
- type PprofConfig
- type SealerConfig
- type Server
- func (s *Server) BlockByNumber(ctx context.Context, req *protobor.GetBlockByNumberRequest) (*protobor.GetBlockByNumberResponse, error)
- func (s *Server) ChainSetHead(ctx context.Context, req *proto.ChainSetHeadRequest) (*proto.ChainSetHeadResponse, error)
- func (s *Server) ChainWatch(req *proto.ChainWatchRequest, reply proto.Eirene_ChainWatchServer) error
- func (s *Server) DebugBlock(req *proto.DebugBlockRequest, stream proto.Eirene_DebugBlockServer) error
- func (s *Server) DebugPprof(req *proto.DebugPprofRequest, stream proto.Eirene_DebugPprofServer) error
- func (s *Server) EireneBlockReceipt(ctx context.Context, req *protobor.ReceiptRequest) (*protobor.ReceiptResponse, error)
- func (s *Server) GetGrpcAddr() string
- func (s *Server) GetLatestBlockNumber() *big.Int
- func (s *Server) GetRootHash(ctx context.Context, req *protobor.GetRootHashRequest) (*protobor.GetRootHashResponse, error)
- func (s *Server) GetVoteOnHash(ctx context.Context, req *protobor.GetVoteOnHashRequest) (*protobor.GetVoteOnHashResponse, error)
- func (s *Server) HeaderByNumber(ctx context.Context, req *protobor.GetHeaderByNumberRequest) (*protobor.GetHeaderByNumberResponse, error)
- func (s *Server) PeersAdd(ctx context.Context, req *proto.PeersAddRequest) (*proto.PeersAddResponse, error)
- func (s *Server) PeersList(ctx context.Context, req *proto.PeersListRequest) (*proto.PeersListResponse, error)
- func (s *Server) PeersRemove(ctx context.Context, req *proto.PeersRemoveRequest) (*proto.PeersRemoveResponse, error)
- func (s *Server) PeersStatus(ctx context.Context, req *proto.PeersStatusRequest) (*proto.PeersStatusResponse, error)
- func (s *Server) Status(ctx context.Context, in *proto.StatusRequest) (*proto.StatusResponse, error)
- func (s *Server) Stop()
- func (s *Server) TransactionReceipt(ctx context.Context, req *protobor.ReceiptRequest) (*protobor.ReceiptResponse, error)
- type TelemetryConfig
- type TxPoolConfig
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func CloseMockServer ¶
func CloseMockServer(server *Server)
func ConvertTopicsToProtoTopics ¶
func ConvertTopicsToProtoTopics(topics []common.Hash) []*protocommon.H256
func DefaultDataDir ¶
func DefaultDataDir() string
func MakeDatabaseHandles ¶
func VerbosityIntToString ¶
func VerbosityStringToInt ¶
func WithGRPCAddress ¶
func WithGRPCAddress() serverOption
func WithGRPCListener ¶
Types ¶
type APIConfig ¶
type APIConfig struct {
// Enabled selects whether the api is enabled
Enabled bool `hcl:"enabled,optional" toml:"enabled,optional"`
// Port is the port number for this api
Port uint64 `hcl:"port,optional" toml:"port,optional"`
// Prefix is the http prefix to expose this api
Prefix string `hcl:"prefix,optional" toml:"prefix,optional"`
// Host is the address to bind the api
Host string `hcl:"host,optional" toml:"host,optional"`
// API is the list of enabled api modules
API []string `hcl:"api,optional" toml:"api,optional"`
// VHost is the list of valid virtual hosts
VHost []string `hcl:"vhosts,optional" toml:"vhosts,optional"`
// Cors is the list of Cors endpoints
Cors []string `hcl:"corsdomain,optional" toml:"corsdomain,optional"`
// Origins is the list of endpoints to accept requests from (only consumed for websockets)
Origins []string `hcl:"origins,optional" toml:"origins,optional"`
// ExecutionPoolSize is max size of workers to be used for rpc execution
ExecutionPoolSize uint64 `hcl:"ep-size,optional" toml:"ep-size,optional"`
// ExecutionPoolRequestTimeout is timeout used by execution pool for rpc execution
ExecutionPoolRequestTimeout time.Duration `hcl:"-,optional" toml:"-"`
ExecutionPoolRequestTimeoutRaw string `hcl:"ep-requesttimeout,optional" toml:"ep-requesttimeout,optional"`
}
type AUTHConfig ¶
type AUTHConfig struct {
// JWTSecret is the hex-encoded jwt secret.
JWTSecret string `hcl:"jwtsecret,optional" toml:"jwtsecret,optional"`
// Addr is the listening address on which authenticated APIs are provided.
Addr string `hcl:"addr,optional" toml:"addr,optional"`
// Port is the port number on which authenticated APIs are provided.
Port uint64 `hcl:"port,optional" toml:"port,optional"`
// VHosts is the list of virtual hostnames which are allowed on incoming requests
// for the authenticated api. This is by default {'localhost'}.
VHosts []string `hcl:"vhosts,optional" toml:"vhosts,optional"`
}
type AccountsConfig ¶
type AccountsConfig struct {
// Unlock is the list of addresses to unlock in the node
Unlock []string `hcl:"unlock,optional" toml:"unlock,optional"`
// PasswordFile is the file where the account passwords are stored
PasswordFile string `hcl:"password,optional" toml:"password,optional"`
// AllowInsecureUnlock allows user to unlock accounts in unsafe http environment.
AllowInsecureUnlock bool `hcl:"allow-insecure-unlock,optional" toml:"allow-insecure-unlock,optional"`
// UseLightweightKDF enables a faster but less secure encryption of accounts
UseLightweightKDF bool `hcl:"lightkdf,optional" toml:"lightkdf,optional"`
// DisableEireneWallet disables the personal wallet endpoints
DisableEireneWallet bool `hcl:"disable-eirene-wallet,optional" toml:"disable-eirene-wallet,optional"`
}
type CacheConfig ¶
type CacheConfig struct {
// Cache is the amount of cache of the node
Cache uint64 `hcl:"cache,optional" toml:"cache,optional"`
// PercGc is percentage of cache used for garbage collection
PercGc uint64 `hcl:"gc,optional" toml:"gc,optional"`
// PercSnapshot is percentage of cache used for snapshots
PercSnapshot uint64 `hcl:"snapshot,optional" toml:"snapshot,optional"`
// PercDatabase is percentage of cache used for the database
PercDatabase uint64 `hcl:"database,optional" toml:"database,optional"`
// PercTrie is percentage of cache used for the trie
PercTrie uint64 `hcl:"trie,optional" toml:"trie,optional"`
// NoPrefetch is used to disable prefetch of tries
NoPrefetch bool `hcl:"noprefetch,optional" toml:"noprefetch,optional"`
// Preimages is used to enable the track of hash preimages
Preimages bool `hcl:"preimages,optional" toml:"preimages,optional"`
// TxLookupLimit sets the maximum number of blocks from head whose tx indices are reserved.
TxLookupLimit uint64 `hcl:"txlookuplimit,optional" toml:"txlookuplimit,optional"`
// Number of block states to keep in memory (default = 128)
TriesInMemory uint64 `hcl:"triesinmemory,optional" toml:"triesinmemory,optional"`
// This is the number of blocks for which logs will be cached in the filter system.
FilterLogCacheSize int `hcl:"blocklogs,optional" toml:"blocklogs,optional"`
// Time after which the Merkle Patricia Trie is stored to disc from memory
TrieTimeout time.Duration `hcl:"-,optional" toml:"-"`
TrieTimeoutRaw string `hcl:"timeout,optional" toml:"timeout,optional"`
// Raise the open file descriptor resource limit (default = system fd limit)
FDLimit int `hcl:"fdlimit,optional" toml:"fdlimit,optional"`
}
type Command ¶
Command is the command to start the sever
type Config ¶
type Config struct {
// Chain is the chain to sync with
Chain string `hcl:"chain,optional" toml:"chain,optional"`
// Identity of the node
Identity string `hcl:"identity,optional" toml:"identity,optional"`
// RequiredBlocks is a list of required (block number, hash) pairs to accept
RequiredBlocks map[string]string `hcl:"eth.requiredblocks,optional" toml:"eth.requiredblocks,optional"`
// Verbosity is the level of the logs to put out
Verbosity int `hcl:"verbosity,optional" toml:"verbosity,optional"`
// LogLevel is the level of the logs to put out
LogLevel string `hcl:"log-level,optional" toml:"log-level,optional"`
// Record information useful for VM and contract debugging
EnablePreimageRecording bool `hcl:"vmdebug,optional" toml:"vmdebug,optional"`
// DataDir is the directory to store the state in
DataDir string `hcl:"datadir,optional" toml:"datadir,optional"`
// Ancient is the directory to store the state in
Ancient string `hcl:"ancient,optional" toml:"ancient,optional"`
// DBEngine is used to select leveldb or pebble as database
DBEngine string `hcl:"db.engine,optional" toml:"db.engine,optional"`
// KeyStoreDir is the directory to store keystores
KeyStoreDir string `hcl:"keystore,optional" toml:"keystore,optional"`
// Maximum number of messages in a batch (default=100, use 0 for no limits)
RPCBatchLimit uint64 `hcl:"rpc.batchlimit,optional" toml:"rpc.batchlimit,optional"`
// Maximum size (in bytes) a result of an rpc request could have (default=100000, use 0 for no limits)
RPCReturnDataLimit uint64 `hcl:"rpc.returndatalimit,optional" toml:"rpc.returndatalimit,optional"`
// SyncMode selects the sync protocol
SyncMode string `hcl:"syncmode,optional" toml:"syncmode,optional"`
// GcMode selects the garbage collection mode for the trie
GcMode string `hcl:"gcmode,optional" toml:"gcmode,optional"`
// state.scheme selects the Scheme to use for storing zenanet state ('hash' or 'path')
StateScheme string `hcl:"state.scheme,optional" toml:"state.scheme,optional"`
// Snapshot enables the snapshot database mode
Snapshot bool `hcl:"snapshot,optional" toml:"snapshot,optional"`
// EireneLogs enables eirene log retrieval
EireneLogs bool `hcl:"eirene.logs,optional" toml:"eirene.logs,optional"`
// Ethstats is the address of the ethstats server to send telemetry
Ethstats string `hcl:"ethstats,optional" toml:"ethstats,optional"`
// Logging has the logging related settings
Logging *LoggingConfig `hcl:"log,block" toml:"log,block"`
// P2P has the p2p network related settings
P2P *P2PConfig `hcl:"p2p,block" toml:"p2p,block"`
// Harmonia has the harmonia connection related settings
Harmonia *HarmoniaConfig `hcl:"harmonia,block" toml:"harmonia,block"`
// TxPool has the transaction pool related settings
TxPool *TxPoolConfig `hcl:"txpool,block" toml:"txpool,block"`
// Sealer has the validator related settings
Sealer *SealerConfig `hcl:"miner,block" toml:"miner,block"`
// JsonRPC has the json-rpc related settings
JsonRPC *JsonRPCConfig `hcl:"jsonrpc,block" toml:"jsonrpc,block"`
// Gpo has the gas price oracle related settings
Gpo *GpoConfig `hcl:"gpo,block" toml:"gpo,block"`
// Telemetry has the telemetry related settings
Telemetry *TelemetryConfig `hcl:"telemetry,block" toml:"telemetry,block"`
// Cache has the cache related settings
Cache *CacheConfig `hcl:"cache,block" toml:"cache,block"`
ExtraDB *ExtraDBConfig `hcl:"leveldb,block" toml:"leveldb,block"`
// Account has the validator account related settings
Accounts *AccountsConfig `hcl:"accounts,block" toml:"accounts,block"`
// GRPC has the grpc server related settings
GRPC *GRPCConfig `hcl:"grpc,block" toml:"grpc,block"`
// Developer has the developer mode related settings
Developer *DeveloperConfig `hcl:"developer,block" toml:"developer,block"`
// ParallelEVM has the parallel evm related settings
ParallelEVM *ParallelEVMConfig `hcl:"parallelevm,block" toml:"parallelevm,block"`
// Develop Fake Author mode to produce blocks without authorisation
DevFakeAuthor bool `hcl:"devfakeauthor,optional" toml:"devfakeauthor,optional"`
// Pprof has the pprof related settings
Pprof *PprofConfig `hcl:"pprof,block" toml:"pprof,block"`
// contains filtered or unexported fields
}
func DefaultConfig ¶
func DefaultConfig() *Config
type DeveloperConfig ¶
type DeveloperConfig struct {
// Enabled enables the developer mode
Enabled bool `hcl:"dev,optional" toml:"dev,optional"`
// Period is the block period to use in developer mode
Period uint64 `hcl:"period,optional" toml:"period,optional"`
// Initial block gas limit
GasLimit uint64 `hcl:"gaslimit,optional" toml:"gaslimit,optional"`
}
type ExtraDBConfig ¶
type ExtraDBConfig struct {
LevelDbCompactionTableSize uint64 `hcl:"compactiontablesize,optional" toml:"compactiontablesize,optional"`
LevelDbCompactionTableSizeMultiplier float64 `hcl:"compactiontablesizemultiplier,optional" toml:"compactiontablesizemultiplier,optional"`
LevelDbCompactionTotalSize uint64 `hcl:"compactiontotalsize,optional" toml:"compactiontotalsize,optional"`
LevelDbCompactionTotalSizeMultiplier float64 `hcl:"compactiontotalsizemultiplier,optional" toml:"compactiontotalsizemultiplier,optional"`
}
type GRPCConfig ¶
type GRPCConfig struct {
// Addr is the bind address for the grpc rpc server
Addr string `hcl:"addr,optional" toml:"addr,optional"`
}
type GpoConfig ¶
type GpoConfig struct {
// Blocks is the number of blocks to track to compute the price oracle
Blocks uint64 `hcl:"blocks,optional" toml:"blocks,optional"`
// Percentile sets the weights to new blocks
Percentile uint64 `hcl:"percentile,optional" toml:"percentile,optional"`
// Maximum header history of gasprice oracle
MaxHeaderHistory int `hcl:"maxheaderhistory,optional" toml:"maxheaderhistory,optional"`
// Maximum block history of gasprice oracle
MaxBlockHistory int `hcl:"maxblockhistory,optional" toml:"maxblockhistory,optional"`
// MaxPrice is an upper bound gas price
MaxPrice *big.Int `hcl:"-,optional" toml:"-"`
MaxPriceRaw string `hcl:"maxprice,optional" toml:"maxprice,optional"`
// IgnorePrice is a lower bound gas price
IgnorePrice *big.Int `hcl:"-,optional" toml:"-"`
IgnorePriceRaw string `hcl:"ignoreprice,optional" toml:"ignoreprice,optional"`
}
type HarmoniaConfig ¶
type HarmoniaConfig struct {
// URL is the url of the harmonia server
URL string `hcl:"url,optional" toml:"url,optional"`
// Without is used to disable remote harmonia during testing
Without bool `hcl:"eirene.without,optional" toml:"eirene.without,optional"`
// GRPCAddress is the address of the harmonia grpc server
GRPCAddress string `hcl:"grpc-address,optional" toml:"grpc-address,optional"`
// RunHarmonia is used to run harmonia as a child process
RunHarmonia bool `hcl:"eirene.runharmonia,optional" toml:"eirene.runharmonia,optional"`
// RunHarmonia args are the arguments to run harmonia with
RunHarmoniaArgs string `hcl:"eirene.runharmoniaargs,optional" toml:"eirene.runharmoniaargs,optional"`
// UseHarmoniaApp is used to fetch data from harmonia app when running harmonia as a child process
UseHarmoniaApp bool `hcl:"eirene.useharmoniaapp,optional" toml:"eirene.useharmoniaapp,optional"`
}
type HttpTimeouts ¶
type HttpTimeouts struct {
// ReadTimeout is the maximum duration for reading the entire
// request, including the body.
//
// Because ReadTimeout does not let Handlers make per-request
// decisions on each request body's acceptable deadline or
// upload rate, most users will prefer to use
// ReadHeaderTimeout. It is valid to use them both.
ReadTimeout time.Duration `hcl:"-,optional" toml:"-"`
ReadTimeoutRaw string `hcl:"read,optional" toml:"read,optional"`
// WriteTimeout is the maximum duration before timing out
// writes of the response. It is reset whenever a new
// request's header is read. Like ReadTimeout, it does not
// let Handlers make decisions on a per-request basis.
WriteTimeout time.Duration `hcl:"-,optional" toml:"-"`
WriteTimeoutRaw string `hcl:"write,optional" toml:"write,optional"`
// IdleTimeout is the maximum amount of time to wait for the
// next request when keep-alives are enabled. If IdleTimeout
// is zero, the value of ReadTimeout is used. If both are
// zero, ReadHeaderTimeout is used.
IdleTimeout time.Duration `hcl:"-,optional" toml:"-"`
IdleTimeoutRaw string `hcl:"idle,optional" toml:"idle,optional"`
}
Used from rpc.HTTPTimeouts
type InfluxDBConfig ¶
type InfluxDBConfig struct {
// V1Enabled enables influx v1 mode
V1Enabled bool `hcl:"influxdb,optional" toml:"influxdb,optional"`
// Endpoint is the url endpoint of the influxdb service
Endpoint string `hcl:"endpoint,optional" toml:"endpoint,optional"`
// Database is the name of the database in Influxdb to store the metrics.
Database string `hcl:"database,optional" toml:"database,optional"`
// Enabled is the username to authorize access to Influxdb
Username string `hcl:"username,optional" toml:"username,optional"`
// Password is the password to authorize access to Influxdb
Password string `hcl:"password,optional" toml:"password,optional"`
// Tags are tags attaches to all generated metrics
Tags map[string]string `hcl:"tags,optional" toml:"tags,optional"`
// Enabled enables influx v2 mode
V2Enabled bool `hcl:"influxdbv2,optional" toml:"influxdbv2,optional"`
// Token is the token to authorize access to Influxdb V2.
Token string `hcl:"token,optional" toml:"token,optional"`
// Bucket is the bucket to store metrics in Influxdb V2.
Bucket string `hcl:"bucket,optional" toml:"bucket,optional"`
// Organization is the name of the organization for Influxdb V2.
Organization string `hcl:"organization,optional" toml:"organization,optional"`
}
type JsonRPCConfig ¶
type JsonRPCConfig struct {
// IPCDisable enables whether ipc is enabled or not
IPCDisable bool `hcl:"ipcdisable,optional" toml:"ipcdisable,optional"`
// IPCPath is the path of the ipc endpoint
IPCPath string `hcl:"ipcpath,optional" toml:"ipcpath,optional"`
// GasCap is the global gas cap for eth-call variants.
GasCap uint64 `hcl:"gascap,optional" toml:"gascap,optional"`
// Sets a timeout used for eth_call (0=infinite)
RPCEVMTimeout time.Duration `hcl:"-,optional" toml:"-"`
RPCEVMTimeoutRaw string `hcl:"evmtimeout,optional" toml:"evmtimeout,optional"`
// TxFeeCap is the global transaction fee cap for send-transaction variants
TxFeeCap float64 `hcl:"txfeecap,optional" toml:"txfeecap,optional"`
// Http has the json-rpc http related settings
Http *APIConfig `hcl:"http,block" toml:"http,block"`
// Ws has the json-rpc websocket related settings
Ws *APIConfig `hcl:"ws,block" toml:"ws,block"`
// Graphql has the json-rpc graphql related settings
Graphql *APIConfig `hcl:"graphql,block" toml:"graphql,block"`
// AUTH RPC related settings
Auth *AUTHConfig `hcl:"auth,block" toml:"auth,block"`
HttpTimeout *HttpTimeouts `hcl:"timeouts,block" toml:"timeouts,block"`
AllowUnprotectedTxs bool `hcl:"allow-unprotected-txs,optional" toml:"allow-unprotected-txs,optional"`
// EnablePersonal enables the deprecated personal namespace.
EnablePersonal bool `hcl:"enabledeprecatedpersonal,optional" toml:"enabledeprecatedpersonal,optional"`
}
type LoggingConfig ¶
type LoggingConfig struct {
// Per-module verbosity: comma-separated list of <pattern>=<level> (e.g. eth/*=5,p2p=4)
Vmodule string `hcl:"vmodule,optional" toml:"vmodule,optional"`
// Format logs with JSON
Json bool `hcl:"json,optional" toml:"json,optional"`
// Request a stack trace at a specific logging statement (e.g. "block.go:271")
Backtrace string `hcl:"backtrace,optional" toml:"backtrace,optional"`
// Prepends log messages with call-site location (file and line number)
Debug bool `hcl:"debug,optional" toml:"debug,optional"`
// EnableBlockTracking allows logging of information collected while tracking block lifecycle
EnableBlockTracking bool `hcl:"enable-block-tracking,optional" toml:"enable-block-tracking,optional"`
}
type P2PConfig ¶
type P2PConfig struct {
// MaxPeers sets the maximum number of connected peers
MaxPeers uint64 `hcl:"maxpeers,optional" toml:"maxpeers,optional"`
// MaxPendPeers sets the maximum number of pending connected peers
MaxPendPeers uint64 `hcl:"maxpendpeers,optional" toml:"maxpendpeers,optional"`
// Bind is the bind address
Bind string `hcl:"bind,optional" toml:"bind,optional"`
// Port is the port number
Port uint64 `hcl:"port,optional" toml:"port,optional"`
// NoDiscover is used to disable discovery
NoDiscover bool `hcl:"nodiscover,optional" toml:"nodiscover,optional"`
// NAT it used to set NAT options
NAT string `hcl:"nat,optional" toml:"nat,optional"`
// Connectivity can be restricted to certain IP networks.
// If this option is set to a non-nil value, only hosts which match one of the
// IP networks contained in the list are considered.
NetRestrict string `hcl:"netrestrict,optional" toml:"netrestrict,optional"`
// P2P node key file
NodeKey string `hcl:"nodekey,optional" toml:"nodekey,optional"`
// P2P node key as hex
NodeKeyHex string `hcl:"nodekeyhex,optional" toml:"nodekeyhex,optional"`
// Discovery has the p2p discovery related settings
Discovery *P2PDiscovery `hcl:"discovery,block" toml:"discovery,block"`
// TxArrivalWait sets the maximum duration the transaction fetcher will wait for
// an announced transaction to arrive before explicitly requesting it
TxArrivalWait time.Duration `hcl:"-,optional" toml:"-"`
TxArrivalWaitRaw string `hcl:"txarrivalwait,optional" toml:"txarrivalwait,optional"`
}
type P2PDiscovery ¶
type P2PDiscovery struct {
// DiscoveryV4 specifies whether V4 discovery should be started.
DiscoveryV4 bool `hcl:"v4disc,optional" toml:"v4disc,optional"`
// V5Enabled is used to enable disc v5 discovery mode
V5Enabled bool `hcl:"v5disc,optional" toml:"v5disc,optional"`
// Bootnodes is the list of initial bootnodes
Bootnodes []string `hcl:"bootnodes,optional" toml:"bootnodes,optional"`
// BootnodesV4 is the list of initial v4 bootnodes
BootnodesV4 []string `hcl:"bootnodesv4,optional" toml:"bootnodesv4,optional"`
// BootnodesV5 is the list of initial v5 bootnodes
BootnodesV5 []string `hcl:"bootnodesv5,optional" toml:"bootnodesv5,optional"`
// StaticNodes is the list of static nodes
StaticNodes []string `hcl:"static-nodes,optional" toml:"static-nodes,optional"`
// TrustedNodes is the list of trusted nodes
TrustedNodes []string `hcl:"trusted-nodes,optional" toml:"trusted-nodes,optional"`
// DNS is the list of enrtree:// URLs which will be queried for nodes to connect to
DNS []string `hcl:"dns,optional" toml:"dns,optional"`
}
type ParallelEVMConfig ¶
type PprofConfig ¶
type PprofConfig struct {
// Enableed enable the pprof HTTP server
Enabled bool `hcl:"pprof,optional" toml:"pprof,optional"`
// pprof HTTP server listening port
Port int `hcl:"port,optional" toml:"port,optional"`
// pprof HTTP server listening interface
Addr string `hcl:"addr,optional" toml:"addr,optional"`
// Turn on memory profiling with the given rate
MemProfileRate int `hcl:"memprofilerate,optional" toml:"memprofilerate,optional"`
// Turn on block profiling with the given rate
BlockProfileRate int `hcl:"blockprofilerate,optional" toml:"blockprofilerate,optional"`
}
type SealerConfig ¶
type SealerConfig struct {
// Enabled is used to enable validator mode
Enabled bool `hcl:"mine,optional" toml:"mine,optional"`
// Zenbase is the address of the validator
Zenbase string `hcl:"zenbase,optional" toml:"zenbase,optional"`
// ExtraData is the block extra data set by the miner
ExtraData string `hcl:"extradata,optional" toml:"extradata,optional"`
// GasCeil is the target gas ceiling for mined blocks.
GasCeil uint64 `hcl:"gaslimit,optional" toml:"gaslimit,optional"`
// GasPrice is the minimum gas price for mining a transaction
GasPrice *big.Int `hcl:"-,optional" toml:"-"`
GasPriceRaw string `hcl:"gasprice,optional" toml:"gasprice,optional"`
// The time interval for miner to re-create mining work.
Recommit time.Duration `hcl:"-,optional" toml:"-"`
RecommitRaw string `hcl:"recommit,optional" toml:"recommit,optional"`
CommitInterruptFlag bool `hcl:"commitinterrupt,optional" toml:"commitinterrupt,optional"`
}
type Server ¶
type Server struct {
proto.UnimplementedeireneServer
protobor.UnimplementedEireneApiServer
// contains filtered or unexported fields
}
func CreateMockServer ¶
func (*Server) BlockByNumber ¶
func (s *Server) BlockByNumber(ctx context.Context, req *protobor.GetBlockByNumberRequest) (*protobor.GetBlockByNumberResponse, error)
func (*Server) ChainSetHead ¶
func (s *Server) ChainSetHead(ctx context.Context, req *proto.ChainSetHeadRequest) (*proto.ChainSetHeadResponse, error)
func (*Server) ChainWatch ¶
func (s *Server) ChainWatch(req *proto.ChainWatchRequest, reply proto.Eirene_ChainWatchServer) error
func (*Server) DebugBlock ¶
func (s *Server) DebugBlock(req *proto.DebugBlockRequest, stream proto.Eirene_DebugBlockServer) error
func (*Server) DebugPprof ¶
func (s *Server) DebugPprof(req *proto.DebugPprofRequest, stream proto.Eirene_DebugPprofServer) error
func (*Server) EireneBlockReceipt ¶
func (s *Server) EireneBlockReceipt(ctx context.Context, req *protobor.ReceiptRequest) (*protobor.ReceiptResponse, error)
func (*Server) GetGrpcAddr ¶
func (*Server) GetLatestBlockNumber ¶
func (*Server) GetRootHash ¶
func (s *Server) GetRootHash(ctx context.Context, req *protobor.GetRootHashRequest) (*protobor.GetRootHashResponse, error)
func (*Server) GetVoteOnHash ¶
func (s *Server) GetVoteOnHash(ctx context.Context, req *protobor.GetVoteOnHashRequest) (*protobor.GetVoteOnHashResponse, error)
func (*Server) HeaderByNumber ¶
func (s *Server) HeaderByNumber(ctx context.Context, req *protobor.GetHeaderByNumberRequest) (*protobor.GetHeaderByNumberResponse, error)
func (*Server) PeersAdd ¶
func (s *Server) PeersAdd(ctx context.Context, req *proto.PeersAddRequest) (*proto.PeersAddResponse, error)
func (*Server) PeersList ¶
func (s *Server) PeersList(ctx context.Context, req *proto.PeersListRequest) (*proto.PeersListResponse, error)
func (*Server) PeersRemove ¶
func (s *Server) PeersRemove(ctx context.Context, req *proto.PeersRemoveRequest) (*proto.PeersRemoveResponse, error)
func (*Server) PeersStatus ¶
func (s *Server) PeersStatus(ctx context.Context, req *proto.PeersStatusRequest) (*proto.PeersStatusResponse, error)
func (*Server) Status ¶
func (s *Server) Status(ctx context.Context, in *proto.StatusRequest) (*proto.StatusResponse, error)
func (*Server) TransactionReceipt ¶
func (s *Server) TransactionReceipt(ctx context.Context, req *protobor.ReceiptRequest) (*protobor.ReceiptResponse, error)
type TelemetryConfig ¶
type TelemetryConfig struct {
// Enabled enables metrics
Enabled bool `hcl:"metrics,optional" toml:"metrics,optional"`
// Expensive enables expensive metrics
Expensive bool `hcl:"expensive,optional" toml:"expensive,optional"`
// InfluxDB has the influxdb related settings
InfluxDB *InfluxDBConfig `hcl:"influx,block" toml:"influx,block"`
// Prometheus Address
PrometheusAddr string `hcl:"prometheus-addr,optional" toml:"prometheus-addr,optional"`
// Open collector endpoint
OpenCollectorEndpoint string `hcl:"opencollector-endpoint,optional" toml:"opencollector-endpoint,optional"`
}
type TxPoolConfig ¶
type TxPoolConfig struct {
// Locals are the addresses that should be treated by default as local
Locals []string `hcl:"locals,optional" toml:"locals,optional"`
// NoLocals enables whether local transaction handling should be disabled
NoLocals bool `hcl:"nolocals,optional" toml:"nolocals,optional"`
// Journal is the path to store local transactions to survive node restarts
Journal string `hcl:"journal,optional" toml:"journal,optional"`
// Rejournal is the time interval to regenerate the local transaction journal
Rejournal time.Duration `hcl:"-,optional" toml:"-"`
RejournalRaw string `hcl:"rejournal,optional" toml:"rejournal,optional"`
// PriceLimit is the minimum gas price to enforce for acceptance into the pool
PriceLimit uint64 `hcl:"pricelimit,optional" toml:"pricelimit,optional"`
// PriceBump is the minimum price bump percentage to replace an already existing transaction (nonce)
PriceBump uint64 `hcl:"pricebump,optional" toml:"pricebump,optional"`
// AccountSlots is the number of executable transaction slots guaranteed per account
AccountSlots uint64 `hcl:"accountslots,optional" toml:"accountslots,optional"`
// GlobalSlots is the maximum number of executable transaction slots for all accounts
GlobalSlots uint64 `hcl:"globalslots,optional" toml:"globalslots,optional"`
// AccountQueue is the maximum number of non-executable transaction slots permitted per account
AccountQueue uint64 `hcl:"accountqueue,optional" toml:"accountqueue,optional"`
// GlobalQueueis the maximum number of non-executable transaction slots for all accounts
GlobalQueue uint64 `hcl:"globalqueue,optional" toml:"globalqueue,optional"`
// lifetime is the maximum amount of time non-executable transaction are queued
LifeTime time.Duration `hcl:"-,optional" toml:"-"`
LifeTimeRaw string `hcl:"lifetime,optional" toml:"lifetime,optional"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.