cli

package
v3.0.0-alpha5.0...-c974331 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2024 License: LGPL-3.0 Imports: 72 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EmbeddedServices

func EmbeddedServices(ctx context.Context,
	erigonDB kv.RoDB, stateCacheCfg kvcache.CoherentConfig,
	rpcFiltersConfig rpchelper.FiltersConfig,
	blockReader services.FullBlockReader, ethBackendServer remote.ETHBACKENDServer, txPoolServer txpool.TxpoolServer,
	miningServer txpool.MiningServer, stateDiffClient StateChangesClient,
	logger log.Logger,
) (eth rpchelper.ApiBackend, txPool txpool.TxpoolClient, mining txpool.MiningClient, stateCache kvcache.Cache, ff *rpchelper.Filters, err error)

func ObtainJWTSecret

func ObtainJWTSecret(cfg *httpcfg.HttpCfg, logger log.Logger) ([]byte, error)

ObtainJWTSecret loads the jwt-secret, either from the provided config, or from the default location. If neither of those are present, it generates a new secret and stores to the default location.

func RemoteServices

func RemoteServices(ctx context.Context, cfg *httpcfg.HttpCfg, logger log.Logger, rootCancel context.CancelFunc) (
	db kv.RoDB, eth rpchelper.ApiBackend, txPool txpool.TxpoolClient, mining txpool.MiningClient,
	stateCache kvcache.Cache, blockReader services.FullBlockReader, engine consensus.EngineReader,
	ff *rpchelper.Filters, bridgeReader BridgeReader, heimdallReader HeimdallReader, err error)

RemoteServices - use when RPCDaemon run as independent process. Still it can use --datadir flag to enable `cfg.WithDatadir` (mode when it on 1 machine with Erigon)

func RootCommand

func RootCommand() (*cobra.Command, *httpcfg.HttpCfg)

func StartRpcServer

func StartRpcServer(ctx context.Context, cfg *httpcfg.HttpCfg, rpcAPI []rpc.API, logger log.Logger) error

func StartRpcServerWithJwtAuthentication

func StartRpcServerWithJwtAuthentication(ctx context.Context, cfg *httpcfg.HttpCfg, rpcAPI []rpc.API, logger log.Logger) error

Types

type BridgeReader

type BridgeReader interface {
	Events(ctx context.Context, blockNum uint64) ([]*types.Message, error)
	EventTxnLookup(ctx context.Context, borTxHash libcommon.Hash) (uint64, bool, error)
	Close()
}

type HeimdallReader

type HeimdallReader interface {
	Producers(ctx context.Context, blockNum uint64) (*valset.ValidatorSet, error)
	Close()
}

type StateChangesClient

type StateChangesClient interface {
	StateChanges(ctx context.Context, in *remote.StateChangeRequest, opts ...grpc.CallOption) (remote.KV_StateChangesClient, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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