fuzz

package
v0.4.4 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AddressList [][20]byte
View Source
var Config2 = FuzzConfig{
	TotalAddressCount: 15,
	TotalTopicCount:   30,
	TotalBlocks:       15,
	MaxLogInTx:        15,
	MaxTxInBlock:      15,
	QueryCount:        30,
	SrcQueryCount:     5,
	DstQueryCount:     5,
	SrcDstQueryCount:  5,
	ReplayLastEveryN:  5,
}
View Source
var DefaultConfig = FuzzConfig{
	TotalAddressCount: 100,
	TotalTopicCount:   200,
	TotalBlocks:       8,
	MaxLogInTx:        5,
	MaxTxInBlock:      5,
	QueryCount:        20,
	SrcQueryCount:     3,
	DstQueryCount:     3,
	SrcDstQueryCount:  3,
	ReplayLastEveryN:  3,
}
View Source
var TopicList [][32]byte

Functions

func GetBlock

func GetBlock(rs randsrc.RandSrc, h int64, cfg FuzzConfig) (blk *types.Block)

func GetLog

func GetLog(rs randsrc.RandSrc) (log types.Log)

func GetTx

func GetTx(rs randsrc.RandSrc, height int64, idx int, cfg FuzzConfig) (tx types.Tx)

func PrintBlocks

func PrintBlocks(blkList []*types.Block)

func Query

func Query(db types.DB, useAddr bool, log types.Log, startHeight, endHeight uint32) map[string]struct{}

func QueryTxByDst

func QueryTxByDst(db types.DB, addr [20]byte, startHeight, endHeight uint32) map[string]struct{}

func QueryTxBySrc

func QueryTxBySrc(db types.DB, addr [20]byte, startHeight, endHeight uint32) map[string]struct{}

func QueryTxBySrcOrDst

func QueryTxBySrcOrDst(db types.DB, addr [20]byte, startHeight, endHeight uint32) map[string]struct{}

func RunFuzz

func RunFuzz(rs randsrc.RandSrc, cfg FuzzConfig)

Types

type FuzzConfig

type FuzzConfig struct {
	TotalAddressCount int
	TotalTopicCount   int
	TotalBlocks       int
	MaxLogInTx        int
	MaxTxInBlock      int
	QueryCount        int
	SrcQueryCount     int
	DstQueryCount     int
	SrcDstQueryCount  int
	ReplayLastEveryN  int64
}

Jump to

Keyboard shortcuts

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