server

package
v1.3.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 7, 2024 License: Apache-2.0 Imports: 55 Imported by: 1

Documentation

Index

Constants

View Source
const DefaultGRPCPort int = 9632
View Source
const DefaultJSONRPCPort int = 8545

Variables

This section is empty.

Functions

func ConsensusSupported added in v0.3.0

func ConsensusSupported(value string) bool

Types

type Config

type Config struct {
	Chain *chain.Chain

	JSONRPC    *JSONRPC
	GRPCAddr   *net.TCPAddr
	LibP2PAddr *net.TCPAddr

	PriceLimit         uint64
	MaxAccountEnqueued uint64
	MaxSlots           uint64

	Telemetry *Telemetry
	Network   *network.Config

	DataDir     string
	RestoreFile *string

	Seal bool

	SecretsManager *secrets.SecretsManagerConfig

	LogLevel hclog.Level

	JSONLogFormat bool

	LogFilePath string

	Relayer bool

	NumBlockConfirmations uint64
	MetricsInterval       time.Duration
}

Config is used to parametrize the minimal client

type ConsensusType added in v0.3.0

type ConsensusType string
const (
	DevConsensus     ConsensusType = "dev"
	IBFTConsensus    ConsensusType = "ibft"
	PolyBFTConsensus ConsensusType = consensusPolyBFT.ConsensusName
	DummyConsensus   ConsensusType = "dummy"
)

type Entry

type Entry struct {
	Enabled bool
	Config  map[string]interface{}
}

Entry is a consensus configuration entry

type ForkManagerFactory added in v1.0.0

type ForkManagerFactory func(forks *chain.Forks) error

type ForkManagerInitialParamsFactory added in v1.0.0

type ForkManagerInitialParamsFactory func(config *chain.Chain) (*forkmanager.ForkParams, error)

type GenesisFactoryHook added in v0.8.0

type GenesisFactoryHook func(config *chain.Chain, engineName string) func(*state.Transition) error

type JSONRPC added in v0.3.0

type JSONRPC struct {
	JSONRPCAddr              *net.TCPAddr
	AccessControlAllowOrigin []string
	BatchLengthLimit         uint64
	BlockRangeLimit          uint64
	ConcurrentRequestsDebug  uint64
	WebSocketReadLimit       uint64
}

JSONRPC holds the config details for the JSON-RPC server

type Server

type Server struct {
	// contains filtered or unexported fields
}

Server is the central manager of the blockchain client

func NewServer

func NewServer(config *Config) (*Server, error)

NewServer creates a new Minimal server, using the passed in configuration

func (*Server) Chain

func (s *Server) Chain() *chain.Chain

Chain returns the chain object of the client

func (*Server) Close

func (s *Server) Close()

Close closes the Minimal server (blockchain, networking, consensus)

func (*Server) JoinPeer added in v0.3.3

func (s *Server) JoinPeer(rawPeerMultiaddr string) error

JoinPeer attempts to add a new peer to the networking server

type Telemetry

type Telemetry struct {
	PrometheusAddr *net.TCPAddr
}

Telemetry holds the config details for metric services

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL