Skip to content

Build a valid-address generator as the mutation seed source. #288

Description

@codeZe-us

Effective fuzzing starts from valid inputs and perturbs them. Generating well-formed G, M, and C addresses gives the mutators a realistic base so the fuzzer explores the boundary of validity rather than only obvious garbage.

Issues/what to fix

  • Implement fn random_valid_address(kind: AddressKind, rng: &mut impl Rng) -> String producing correctly checksummed strkey for G, M, and C.
  • For M addresses, embed a random 64-bit muxed id so the decoder path is exercised across the full u64 range.
  • Verify each generated address round-trips through parse and panic in the generator itself if it does not, since that would mean the seed source is broken.

Files location

src/generate.rs
Expected result
The generator emits addresses that all parse successfully, covering every address kind.

Join the contributor Telegram group: https://t.me/+g6EPIsHod0RhZGZk

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions