node

package
v0.0.0-...-7be3494 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2024 License: Apache-2.0 Imports: 47 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type G

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

func NewPhylaxNode

func NewPhylaxNode(
	env common.Environment,
	gk *ecdsa.PrivateKey,
) *G

func (*G) Run

func (g *G) Run(rootCtxCancel context.CancelFunc, options ...*PhylaxOption) supervisor.Runnable

type IbcWatcherConfig

type IbcWatcherConfig struct {
	Websocket      string
	Lcd            string
	BlockHeightURL string
	Contract       string
}

type LogSizeCounter

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

func NewLogSizeCounter

func NewLogSizeCounter(lvl zapcore.Level) *LogSizeCounter

func (*LogSizeCounter) Core

func (lc *LogSizeCounter) Core() zapcore.Core

func (*LogSizeCounter) Reset

func (lc *LogSizeCounter) Reset() uint64

func (*LogSizeCounter) Sync

func (lc *LogSizeCounter) Sync() error

func (*LogSizeCounter) Write

func (lc *LogSizeCounter) Write(p []byte) (n int, err error)

type PhylaxOption

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

func PhylaxOptionAccountant

func PhylaxOptionAccountant(contract string, websocket string, enforcing bool, deltachainConn *deltaconn.ClientConn) *PhylaxOption

PhylaxOptionAccountant configures the Accountant module. Dependencies: db

func PhylaxOptionAdminService

func PhylaxOptionAdminService(socketPath string, ethRpc *string, ethContract *string, rpcMap map[string]string) *PhylaxOption

PhylaxOptionAdminService enables the admin rpc service on a unix socket. Dependencies: db, governor

func PhylaxOptionDatabase

func PhylaxOptionDatabase(db *db.Database) *PhylaxOption

PhylaxOptionDatabase configures the main database to be used for this phylax node. Dependencies: none

func PhylaxOptionGatewayRelayer

func PhylaxOptionGatewayRelayer(gatewayRelayerContract string, deltachainConn *deltaconn.ClientConn) *PhylaxOption

PhylaxOptionGatewayRelayer configures the Gateway Relayer module. If the gateway relayer smart contract is configured, we will instantiate the GatewayRelayer and signed VAAs will be passed to it for processing when they are published. It will forward payload three transfers destined for the specified contract on deltachain to that contract.

func PhylaxOptionGovernor

func PhylaxOptionGovernor(governorEnabled bool) *PhylaxOption

PhylaxOptionGovernor enables or disables the governor. Dependencies: db

func PhylaxOptionNoAccountant

func PhylaxOptionNoAccountant() *PhylaxOption

PhylaxOptionNoAccountant disables the accountant. It is a shorthand for PhylaxOptionAccountant("", "", false, nil) Dependencies: none

func PhylaxOptionP2P

func PhylaxOptionP2P(p2pKey libp2p_crypto.PrivKey, networkId string, bootstrapPeers string, nodeName string, disableHeartbeatVerify bool, port uint, ccqBootstrapPeers string, ccqPort uint, ccqAllowedPeers string, ibcFeaturesFunc func() string) *PhylaxOption

PhylaxOptionP2P configures p2p networking. Dependencies: Accountant, Governor

func PhylaxOptionProcessor

func PhylaxOptionProcessor() *PhylaxOption

PhylaxOptionProcessor enables the default processor, which is required to make consensus on messages. Dependencies: db, governor, accountant

func PhylaxOptionPublicRpcSocket

func PhylaxOptionPublicRpcSocket(publicGRPCSocketPath string, publicRpcLogDetail common.GrpcLogDetail) *PhylaxOption

PhylaxOptionPublicRpcSocket enables the public rpc service on a unix socket Dependencies: db, governor

func PhylaxOptionPublicWeb

func PhylaxOptionPublicWeb(listenAddr string, publicGRPCSocketPath string, tlsHostname string, tlsProdEnv bool, tlsCacheDir string) *PhylaxOption

PhylaxOptionPublicWeb enables the public rpc service on http, i.e. gRPC-web and JSON-web. Dependencies: db, governor, publicrpcsocket

func PhylaxOptionPublicrpcTcpService

func PhylaxOptionPublicrpcTcpService(publicRpc string, publicRpcLogDetail common.GrpcLogDetail) *PhylaxOption

PhylaxOptionPublicrpcTcpService enables the public gRPC service on TCP. Dependencies: db, governor, publicrpcsocket

func PhylaxOptionQueryHandler

func PhylaxOptionQueryHandler(ccqEnabled bool, allowedRequesters string) *PhylaxOption

PhylaxOptionQueryHandler configures the Cross Chain Query module.

func PhylaxOptionStatusServer

func PhylaxOptionStatusServer(statusAddr string) *PhylaxOption

PhylaxOptionStatusServer configures the status server, including /readyz and /metrics. If g.env == common.UnsafeDevNet || g.env == common.GoTest, pprof will be enabled under /debug/pprof/ Dependencies: none

func PhylaxOptionWatchers

func PhylaxOptionWatchers(watcherConfigs []watchers.WatcherConfig, ibcWatcherConfig *IbcWatcherConfig) *PhylaxOption

PhylaxOptionWatchers configues all normal watchers and all IBC watchers. They need to be all configured at the same time because they may depend on each other. TODO: currently, IBC watchers are partially statically configured in ibc.ChainConfig. It might make sense to refactor this to instead provide this as a parameter here. Dependencies: none

type PrometheusCtxKey

type PrometheusCtxKey struct{}

Jump to

Keyboard shortcuts

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