Skip to content

feat(fuzz): create initial seed corpus from forge test traces #10875

@0xalpharush

Description

@0xalpharush

Component

Forge

Describe the feature you would like

Tests contain valuable info on the sequence of interactions expected by a contract as well as input data selected by hopefully informed devs, so it would probably improve coverage guided fuzzing to insert this info into the corpus dir for mutation as opposed to starting from random

test_MyContract() {
MyContract.A(1,2,3)
MyContract.B("foo")
MyContract.C()
}

[ target: , calldata: abi.encode(MyContract.A(1,2,3)), target: , calldata: abi.encode(MyContract.B("foo")) ....

Related: the reverse can be done for reproducers to generate failing tests for debugging

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions