Documentation ¶
Index ¶
- Constants
- func ConsensusSupported(value string) bool
- func GetConsensusBackend(value string) (consensus.Factory, bool)
- func GetSecretsManager(secretType secrets.SecretsManagerType) (secrets.SecretsManagerFactory, bool)
- func NewJSONRPCStore(state state.State, blockchain *blockchain.Blockchain, ...) jsonrpc.JSONRPCStore
- func SetupDataDir(dataDir string, paths []string) error
- type Config
- type ConsensusType
- type Entry
- type GraphQL
- type JSONRPC
- type JSONRPCStoreMetrics
- func (m *JSONRPCStoreMetrics) AddTxInc()
- func (m *JSONRPCStoreMetrics) ApplyTxnInc()
- func (m *JSONRPCStoreMetrics) GetAccountInc()
- func (m *JSONRPCStoreMetrics) GetAvgGasPriceInc()
- func (m *JSONRPCStoreMetrics) GetBlockByHashInc()
- func (m *JSONRPCStoreMetrics) GetBlockByNumberInc()
- func (m *JSONRPCStoreMetrics) GetCapacityInc()
- func (m *JSONRPCStoreMetrics) GetCodeInc()
- func (m *JSONRPCStoreMetrics) GetForksInTimeInc()
- func (m *JSONRPCStoreMetrics) GetHeaderByHashInc()
- func (m *JSONRPCStoreMetrics) GetHeaderByNumberInc()
- func (m *JSONRPCStoreMetrics) GetNonceInc()
- func (m *JSONRPCStoreMetrics) GetPendingTxInc()
- func (m *JSONRPCStoreMetrics) GetReceiptsByHashInc()
- func (m *JSONRPCStoreMetrics) GetStorageInc()
- func (m *JSONRPCStoreMetrics) GetSyncProgressionInc()
- func (m *JSONRPCStoreMetrics) GetTxsInc()
- func (m *JSONRPCStoreMetrics) HeaderInc()
- func (m *JSONRPCStoreMetrics) PeerCountInc()
- func (m *JSONRPCStoreMetrics) ReadTxLookupInc()
- func (m *JSONRPCStoreMetrics) StateAtTransactionInc()
- func (m *JSONRPCStoreMetrics) SubscribeEventsInc()
- type LeveldbOptions
- type Server
- type Telemetry
Constants ¶
const DefaultGRPCPort int = 9632
const DefaultGraphQLPort int = 9898
const DefaultJSONRPCPort int = 8545
const DefaultJaegerPort int = 14268
const DefaultPprofPort int = 6060
Variables ¶
This section is empty.
Functions ¶
func ConsensusSupported ¶
func GetConsensusBackend ¶ added in v1.2.2
func GetSecretsManager ¶ added in v1.2.2
func GetSecretsManager(secretType secrets.SecretsManagerType) (secrets.SecretsManagerFactory, bool)
func NewJSONRPCStore ¶ added in v1.2.2
func NewJSONRPCStore( state state.State, blockchain *blockchain.Blockchain, restoreProgression *progress.ProgressionWrapper, txpool *txpool.TxPool, executor *state.Executor, consensus consensus.Consensus, network network.Server, metrics *JSONRPCStoreMetrics, gpo *gasprice.Oracle, ) jsonrpc.JSONRPCStore
func SetupDataDir ¶
SetupDataDir sets up the dogechain data directory and sub-folders
Types ¶
type Config ¶
type Config struct { Chain *chain.Chain JSONRPC *JSONRPC EnableGraphQL bool GraphQL *GraphQL GRPCAddr *net.TCPAddr LibP2PAddr *net.TCPAddr PriceLimit uint64 MaxSlots uint64 BlockTime uint64 PruneTickSeconds uint64 PromoteOutdateSeconds uint64 Telemetry *Telemetry Network *network.Config DataDir string RestoreFile *string LeveldbOptions *LeveldbOptions Seal bool SecretsManager *secrets.SecretsManagerConfig LogLevel hclog.Level LogFilePath string Daemon bool ValidatorKey string BlockBroadcast bool GasPriceOracle gasprice.Config }
Config is used to parametrize the minimal client
type ConsensusType ¶
type ConsensusType string
const ( DevConsensus ConsensusType = "dev" IBFTConsensus ConsensusType = "ibft" DummyConsensus ConsensusType = "dummy" )
type JSONRPC ¶
type JSONRPC struct { JSONRPCAddr *net.TCPAddr AccessControlAllowOrigin []string BatchLengthLimit uint64 BlockRangeLimit uint64 JSONNamespace []string EnableWS bool EnablePprof bool }
JSONRPC holds the config details for the JSON-RPC server
type JSONRPCStoreMetrics ¶ added in v1.2.2
type JSONRPCStoreMetrics struct {
// contains filtered or unexported fields
}
func JSONRPCStoreNilMetrics ¶ added in v1.2.2
func JSONRPCStoreNilMetrics() *JSONRPCStoreMetrics
JSONRPCStoreNilMetrics will return the non operational jsonrpc metrics
func NewJSONRPCStoreMetrics ¶ added in v1.2.2
func NewJSONRPCStoreMetrics(namespace string, labelsWithValues ...string) *JSONRPCStoreMetrics
NewJSONRPCStoreMetrics return the JSONRPCStore metrics instance
func (*JSONRPCStoreMetrics) AddTxInc ¶ added in v1.2.2
func (m *JSONRPCStoreMetrics) AddTxInc()
AddTx api calls
func (*JSONRPCStoreMetrics) ApplyTxnInc ¶ added in v1.2.2
func (m *JSONRPCStoreMetrics) ApplyTxnInc()
ApplyTxn api calls
func (*JSONRPCStoreMetrics) GetAccountInc ¶ added in v1.2.2
func (m *JSONRPCStoreMetrics) GetAccountInc()
GetAccount api calls
func (*JSONRPCStoreMetrics) GetAvgGasPriceInc ¶ added in v1.2.2
func (m *JSONRPCStoreMetrics) GetAvgGasPriceInc()
GetAvgGasPrice api calls
func (*JSONRPCStoreMetrics) GetBlockByHashInc ¶ added in v1.2.2
func (m *JSONRPCStoreMetrics) GetBlockByHashInc()
GetBlockByHash api calls
func (*JSONRPCStoreMetrics) GetBlockByNumberInc ¶ added in v1.2.2
func (m *JSONRPCStoreMetrics) GetBlockByNumberInc()
GetBlockByNumber api calls
func (*JSONRPCStoreMetrics) GetCapacityInc ¶ added in v1.2.2
func (m *JSONRPCStoreMetrics) GetCapacityInc()
GetCapacity api calls
func (*JSONRPCStoreMetrics) GetCodeInc ¶ added in v1.2.2
func (m *JSONRPCStoreMetrics) GetCodeInc()
GetCode api calls
func (*JSONRPCStoreMetrics) GetForksInTimeInc ¶ added in v1.2.2
func (m *JSONRPCStoreMetrics) GetForksInTimeInc()
GetForksInTime api calls
func (*JSONRPCStoreMetrics) GetHeaderByHashInc ¶ added in v1.2.2
func (m *JSONRPCStoreMetrics) GetHeaderByHashInc()
GetHeaderByHash api calls
func (*JSONRPCStoreMetrics) GetHeaderByNumberInc ¶ added in v1.2.2
func (m *JSONRPCStoreMetrics) GetHeaderByNumberInc()
GetHeaderByNumber api calls
func (*JSONRPCStoreMetrics) GetNonceInc ¶ added in v1.2.2
func (m *JSONRPCStoreMetrics) GetNonceInc()
GetNonce api calls
func (*JSONRPCStoreMetrics) GetPendingTxInc ¶ added in v1.2.2
func (m *JSONRPCStoreMetrics) GetPendingTxInc()
GetPendingTx api calls
func (*JSONRPCStoreMetrics) GetReceiptsByHashInc ¶ added in v1.2.2
func (m *JSONRPCStoreMetrics) GetReceiptsByHashInc()
GetReceiptsByHash api calls
func (*JSONRPCStoreMetrics) GetStorageInc ¶ added in v1.2.2
func (m *JSONRPCStoreMetrics) GetStorageInc()
GetGetStorage api calls
func (*JSONRPCStoreMetrics) GetSyncProgressionInc ¶ added in v1.2.2
func (m *JSONRPCStoreMetrics) GetSyncProgressionInc()
GetSyncProgression api calls
func (*JSONRPCStoreMetrics) GetTxsInc ¶ added in v1.2.2
func (m *JSONRPCStoreMetrics) GetTxsInc()
GetTxs api calls
func (*JSONRPCStoreMetrics) HeaderInc ¶ added in v1.2.2
func (m *JSONRPCStoreMetrics) HeaderInc()
Header api calls
func (*JSONRPCStoreMetrics) PeerCountInc ¶ added in v1.2.2
func (m *JSONRPCStoreMetrics) PeerCountInc()
PeerCount api calls
func (*JSONRPCStoreMetrics) ReadTxLookupInc ¶ added in v1.2.2
func (m *JSONRPCStoreMetrics) ReadTxLookupInc()
ReadTxLookup api calls
func (*JSONRPCStoreMetrics) StateAtTransactionInc ¶ added in v1.2.2
func (m *JSONRPCStoreMetrics) StateAtTransactionInc()
StateAtTransaction api calls
func (*JSONRPCStoreMetrics) SubscribeEventsInc ¶ added in v1.2.2
func (m *JSONRPCStoreMetrics) SubscribeEventsInc()
SubscribeEvents api calls
type LeveldbOptions ¶ added in v1.1.3
type LeveldbOptions struct { CacheSize int Handles int BloomKeyBits int CompactionTableSize int CompactionTotalSize int NoSync bool }
LeveldbOptions holds the leveldb options
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Minimal is the central manager of the blockchain client
func (*Server) Close ¶
func (s *Server) Close()
Close closes the server sequence:
consensus: wait for consensus exit any IbftState, stop write any block to blockchain storage and stop write any state to state storage txpool: stop accepting new transactions networking: stop transport stateStorage: safe close state storage blockchain: safe close state storage