runtimeverification / runtimeverification/kontrol

Consider supporting Foundry's invariant testing

Open
#677 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Python
Stars
122
Forks
16
PR merge metrics
No merged PRs in 30d

Description

Based on a post-workshop EthCC question @JuanCoRo got asked; will move it to backlog for now.

We might consider supporting Foundry's invariant tests, which executes function call sequences in an attempt to break an invariant specified as a function, e.g.,

function invariant_job1() public {
   assertInvariants();
}

function invariant_job2() public {
   assertInvariants();
}

function assertInvariants() internal {
   assertEq(val1, val2);
   assertEq(val3, val4);
}

That is something we could do using symbolic execution (modulo path and configuration explosion).

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked Foundry invariant-testing documentation and the issue's Solidity examples. Compare the described function-call sequences and invariant functions with Kontrol's symbolic-execution capabilities, then determine the configuration and path-explosion constraints. Done means Kontrol can support the proposed invariant-testing workflow with documented behavior and coverage.

Written by the indexing model from the issue text.

Assessment

Tech stack
solidity
Domain
security, testing
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.