test

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2024 License: MIT Imports: 32 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EVConfig

type EVConfig struct {
	FullnodeRpcEndpoint string        // Fullnode rpc endpoint used as benchmark
	InfuraRpcEndpoint   string        // Infura rpc endpoint used to be validated against
	EpochScanFrom       uint64        // the epoch scan from
	ScanInterval        time.Duration // scan interval
	SamplingInterval    time.Duration // sampling interval
	// sampling epoch type:
	// lm(latest_mined), ls(latest_state), lc(latest_confirmed), lf(latest_finalized), lcp(latest_checkpoint)
	SamplingEpochType string
}

EVConfig validation config provided to EpochValidator

type EpochValidator

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

EpochValidator pulls epoch data from fullnode and infura endpoints, and then compares the epoch data to validate if the infura epoch data complies to fullnode.

func MustNewEpochValidator

func MustNewEpochValidator(conf *EVConfig) *EpochValidator

func (*EpochValidator) Destroy

func (validator *EpochValidator) Destroy()

func (*EpochValidator) Run

func (validator *EpochValidator) Run(ctx context.Context, wg *sync.WaitGroup)

type EthValidConfig

type EthValidConfig struct {
	FullnodeRpcEndpoint string        // Fullnode rpc endpoint used as benchmark
	InfuraRpcEndpoint   string        // Infura rpc endpoint used to be validated against
	ScanFromBlock       uint64        // the block to scan from
	ScanInterval        time.Duration // scan interval
	SamplingInterval    time.Duration // sampling interval
}

EthValidConfig validation config provided to EthValidator

type EthValidator

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

EthValidator pulls eth block data from fullnode and infura endpoints, and then compares the eth block data to validate if the infura eth block data complies to fullnode.

func MustNewEthValidator

func MustNewEthValidator(conf *EthValidConfig) *EthValidator

func (*EthValidator) Destroy

func (validator *EthValidator) Destroy()

func (*EthValidator) Run

func (validator *EthValidator) Run(ctx context.Context, wg *sync.WaitGroup)

type PSVConfig

type PSVConfig struct {
	FullnodeRpcEndpoint string // fullnode websocket rpc endpoint used as benchmark
	InfuraRpcEndpoint   string // infura websocket rpc endpoint used to be validated against
}

PSVConfig validation config provided to PubSubValidator

type PubSubValidator

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

PubSubValidator subscribes to fullnode and infura websocket endpoints to receive epoch data of type logs/newHeads/epochs, and then compares the epoch data to validate if the infura pubsub results comply to fullnode.

func MustNewPubSubValidator

func MustNewPubSubValidator(conf *PSVConfig) *PubSubValidator

func (*PubSubValidator) Destroy

func (validator *PubSubValidator) Destroy()

func (*PubSubValidator) Run

func (validator *PubSubValidator) Run(ctx context.Context, wg *sync.WaitGroup)

Jump to

Keyboard shortcuts

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