Skip to content

Implement fuzzing plans to fuzz multiple contracts at a time #148

@BowTiedRadone

Description

@BowTiedRadone

To prevent exploits from interactions of multiple contracts, one idea came to mind to implement fuzzing plans. For example, if the clarinet project's contracts directory looks like this:

contracts
├─ contract1.clar
├─ contract2.clar
└─ contract3.clar

We could allow the user to setup a fuzzing plan by specifying the interconnected contracts. For example, if contract1 contains action1 entry points (e.g. deposit into protocol), contract2 contains action2 entry points (e.g. withdraw from protocol), and contract3 is a registry that has data structures for storage integrity of the protocol, the user could create a fuzzing plan named action1action2fuzzing pointing to [contract1, contract2].

The custom plan, according to the testing routine, will:

  • call public functions and check invariants for both contracts during invariant testing
  • run stateful tests for both contracts during property testing

Based on how the majority of Stacks protocols business logic looks like, this could be a nice improvement. Open to brainstorming, refinement, simplification.

P.S. To simplify the user onboarding process to Rendezvous, we could make use of <contract-name> = * command-line argument to check all the contracts in the Clarinet project at a time.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions