Documentation
¶
Overview ¶
Package typegen generates random SSZ-compatible Go struct definitions for fuzz testing.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
NumTypes int // Number of top-level types to generate
MaxFields int // Maximum fields per struct
MaxDepth int // Maximum nesting depth
MaxArrayLen int // Maximum fixed array length
MaxListLimit int // Maximum list ssz-max value
Extended bool // Generate extended types (signed ints, floats, big.Int, optional)
Seed int64
}
Config controls the type generation parameters.
func DefaultConfig ¶
func DefaultConfig() Config
DefaultConfig returns a reasonable default configuration.
type FieldDef ¶
type FieldDef struct {
Name string
GoType string
Tags string
Imports []string // package import paths needed
}
FieldDef represents a single field in a generated struct.
type Generator ¶
type Generator struct {
// contains filtered or unexported fields
}
Generator generates random SSZ-compatible Go struct types.
func NewGenerator ¶
NewGenerator creates a new type generator.
func (*Generator) Generate ¶
Generate creates the configured number of random types. Returns the generated type definitions.
func (*Generator) WriteGoSource ¶
WriteGoSource writes all generated types as valid Go source code.
func (*Generator) WriteRegistry ¶
WriteRegistry generates a registry_gen.go that populates corpus.Registry.
Click to show internal directories.
Click to hide internal directories.