Documentation ¶
Index ¶
- func InitFileConfig(cmd *cobra.Command, options ConfigOptions) error
- func RegisterFlagWithValidationOrFail(cmd *cobra.Command, name string, description string, example string, ...) *string
- type ConfigOptions
- type G
- type GuardianOption
- func GuardianOptionAccountant(contract string, websocket string, enforcing bool, ...) *GuardianOption
- func GuardianOptionAdminService(socketPath string, ethRpc *string, ethContract *string, ...) *GuardianOption
- func GuardianOptionDatabase(db *db.Database) *GuardianOption
- func GuardianOptionGatewayRelayer(gatewayRelayerContract string, wormchainConn *wormconn.ClientConn) *GuardianOption
- func GuardianOptionGovernor(governorEnabled bool) *GuardianOption
- func GuardianOptionNoAccountant() *GuardianOption
- func GuardianOptionP2P(p2pKey libp2p_crypto.PrivKey, networkId string, bootstrapPeers string, ...) *GuardianOption
- func GuardianOptionProcessor() *GuardianOption
- func GuardianOptionPublicRpcSocket(publicGRPCSocketPath string, publicRpcLogDetail common.GrpcLogDetail) *GuardianOption
- func GuardianOptionPublicWeb(listenAddr string, publicGRPCSocketPath string, tlsHostname string, ...) *GuardianOption
- func GuardianOptionPublicrpcTcpService(publicRpc string, publicRpcLogDetail common.GrpcLogDetail) *GuardianOption
- func GuardianOptionQueryHandler(ccqEnabled bool, allowedRequesters string) *GuardianOption
- func GuardianOptionStatusServer(statusAddr string) *GuardianOption
- func GuardianOptionWatchers(watcherConfigs []watchers.WatcherConfig, ibcWatcherConfig *IbcWatcherConfig) *GuardianOption
- type IbcWatcherConfig
- type LogSizeCounter
- type PrometheusCtxKey
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitFileConfig ¶
func InitFileConfig(cmd *cobra.Command, options ConfigOptions) error
InitFileConfig initializes configuration according to the following precedence: 1. Command line flags 2. Environment variables 3. Config file 4. Cobra default values
Types ¶
type ConfigOptions ¶
type G ¶
type G struct {
// contains filtered or unexported fields
}
func NewGuardianNode ¶
func NewGuardianNode( env common.Environment, gk *ecdsa.PrivateKey, ) *G
func (*G) Run ¶
func (g *G) Run(rootCtxCancel context.CancelFunc, options ...*GuardianOption) supervisor.Runnable
type GuardianOption ¶
type GuardianOption struct {
// contains filtered or unexported fields
}
func GuardianOptionAccountant ¶
func GuardianOptionAccountant(contract string, websocket string, enforcing bool, wormchainConn *wormconn.ClientConn) *GuardianOption
GuardianOptionAccountant configures the Accountant module. Dependencies: db
func GuardianOptionAdminService ¶
func GuardianOptionAdminService(socketPath string, ethRpc *string, ethContract *string, rpcMap map[string]string) *GuardianOption
GuardianOptionAdminService enables the admin rpc service on a unix socket. Dependencies: db, governor
func GuardianOptionDatabase ¶
func GuardianOptionDatabase(db *db.Database) *GuardianOption
GuardianOptionDatabase configures the main database to be used for this guardian node. Dependencies: none
func GuardianOptionGatewayRelayer ¶
func GuardianOptionGatewayRelayer(gatewayRelayerContract string, wormchainConn *wormconn.ClientConn) *GuardianOption
GuardianOptionGatewayRelayer 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 wormchain to that contract.
func GuardianOptionGovernor ¶
func GuardianOptionGovernor(governorEnabled bool) *GuardianOption
GuardianOptionGovernor enables or disables the governor. Dependencies: db
func GuardianOptionNoAccountant ¶
func GuardianOptionNoAccountant() *GuardianOption
GuardianOptionNoAccountant disables the accountant. It is a shorthand for GuardianOptionAccountant("", "", false, nil) Dependencies: none
func GuardianOptionP2P ¶
func GuardianOptionP2P(p2pKey libp2p_crypto.PrivKey, networkId string, bootstrapPeers string, nodeName string, disableHeartbeatVerify bool, port uint, ccqBootstrapPeers string, ccqPort uint, ccqAllowedPeers string, ibcFeaturesFunc func() string) *GuardianOption
GuardianOptionP2P configures p2p networking. Dependencies: Accountant, Governor
func GuardianOptionProcessor ¶
func GuardianOptionProcessor() *GuardianOption
GuardianOptionProcessor enables the default processor, which is required to make consensus on messages. Dependencies: db, governor, accountant
func GuardianOptionPublicRpcSocket ¶
func GuardianOptionPublicRpcSocket(publicGRPCSocketPath string, publicRpcLogDetail common.GrpcLogDetail) *GuardianOption
GuardianOptionPublicRpcSocket enables the public rpc service on a unix socket Dependencies: db, governor
func GuardianOptionPublicWeb ¶
func GuardianOptionPublicWeb(listenAddr string, publicGRPCSocketPath string, tlsHostname string, tlsProdEnv bool, tlsCacheDir string) *GuardianOption
GuardianOptionPublicWeb enables the public rpc service on http, i.e. gRPC-web and JSON-web. Dependencies: db, governor, publicrpcsocket
func GuardianOptionPublicrpcTcpService ¶
func GuardianOptionPublicrpcTcpService(publicRpc string, publicRpcLogDetail common.GrpcLogDetail) *GuardianOption
GuardianOptionPublicrpcTcpService enables the public gRPC service on TCP. Dependencies: db, governor, publicrpcsocket
func GuardianOptionQueryHandler ¶
func GuardianOptionQueryHandler(ccqEnabled bool, allowedRequesters string) *GuardianOption
GuardianOptionQueryHandler configures the Cross Chain Query module.
func GuardianOptionStatusServer ¶
func GuardianOptionStatusServer(statusAddr string) *GuardianOption
GuardianOptionStatusServer 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 GuardianOptionWatchers ¶
func GuardianOptionWatchers(watcherConfigs []watchers.WatcherConfig, ibcWatcherConfig *IbcWatcherConfig) *GuardianOption
GuardianOptionWatchers 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 IbcWatcherConfig ¶
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
type PrometheusCtxKey ¶
type PrometheusCtxKey struct{}