test

package
v1.3.3-testnet Latest Latest
Warning

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

Go to latest
Published: Mar 28, 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 CfxPubSubValidator

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

CfxPubSubValidator core space pubsub validator

func MustNewCfxPubSubValidator

func MustNewCfxPubSubValidator(conf *PSVConfig) *CfxPubSubValidator

func (*CfxPubSubValidator) Destroy

func (validator *CfxPubSubValidator) Destroy()

func (*CfxPubSubValidator) Run

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

type CfxVFValidator

type CfxVFValidator struct {
	VFValidator
	// contains filtered or unexported fields
}

func MustNewCfxVFValidator

func MustNewCfxVFValidator(conf *VFValidConfig) *CfxVFValidator

func (*CfxVFValidator) Destroy

func (validator *CfxVFValidator) Destroy()

func (*CfxVFValidator) Run

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

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 EthPubSubValidator

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

EthPubSubValidator evm space pubsub validator

func MustNewEthPubSubValidator

func MustNewEthPubSubValidator(conf *PSVConfig) *EthPubSubValidator

func (*EthPubSubValidator) Destroy

func (validator *EthPubSubValidator) Destroy()

func (*EthPubSubValidator) Run

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

type EthVFValidator

type EthVFValidator struct {
	VFValidator
	// contains filtered or unexported fields
}

EthVFValidator evm space virtual filter test validator

func MustNewEthVFValidator

func MustNewEthVFValidator(conf *VFValidConfig) *EthVFValidator

func (*EthVFValidator) Destroy

func (validator *EthVFValidator) Destroy()

func (*EthVFValidator) Run

func (validator *EthVFValidator) 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{}

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.

type TestValidator

type TestValidator interface {
	Run(ctx context.Context, wg *sync.WaitGroup)
	Destroy()
}

type VFValidConfig

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

VFValidConfig validation config for virtual filter

type VFValidator

type VFValidator struct{}

VFValidator virtual filter validator base to poll filter changes from fullnode and infura endpoints, and then compares the filter change to validate if the poll results comply to fullnode.

Jump to

Keyboard shortcuts

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