Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: convert kontrol tests #53

Draft
wants to merge 63 commits into
base: feat/symbolic-testing
Choose a base branch
from

Commits on Aug 15, 2024

  1. chore: configure medusa with basic supERC20 self-bridging

    - used --foundry-compile-all to ensure the test contract under
      `test/properties` is compiled (otherwise it is not compiled and medusa
      crashes when it can't find it's compiled representation)
    - set src,test,script to test/properties/medusa to not waste time
      compiling contracts that are not required for the medusa campaign
    - used an atomic bridge, which doesnt allow for testing of several of
      the proposed invariants
    0xteddybear committed Aug 15, 2024
    Configuration menu
    Copy the full SHA
    73236b4 View commit details
    Browse the repository at this point in the history
  2. fix: delete dead code

    0xteddybear committed Aug 15, 2024
    Configuration menu
    Copy the full SHA
    6f386a5 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    e8d42b8 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    326366b View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    7a66ae6 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    fa4cf29 View commit details
    Browse the repository at this point in the history
  7. test: guide the fuzzer a little bit less

    previously: initial mint, bound on transfer amount: 146625 calls in 200s
    now: no initial mint, no bound on transfer amount: 176835 calls in 200s
    
    it doesn't seem to slow the fuzzer down
    0xteddybear committed Aug 15, 2024
    Configuration menu
    Copy the full SHA
    8173ee7 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    ec29415 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    75f6977 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    d761fa9 View commit details
    Browse the repository at this point in the history

Commits on Aug 16, 2024

  1. fix: feedback from disco

    0xteddybear committed Aug 16, 2024
    Configuration menu
    Copy the full SHA
    51a72e3 View commit details
    Browse the repository at this point in the history
  2. fix: feedback from doc

    0xteddybear committed Aug 16, 2024
    Configuration menu
    Copy the full SHA
    745dcbc View commit details
    Browse the repository at this point in the history

Commits on Aug 19, 2024

  1. Configuration menu
    Copy the full SHA
    07ca17e View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    f23d8ff View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    590a3ba View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    51bf7fd View commit details
    Browse the repository at this point in the history

Commits on Aug 20, 2024

  1. Configuration menu
    Copy the full SHA
    79bf5e5 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    6e13fd2 View commit details
    Browse the repository at this point in the history

Commits on Aug 21, 2024

  1. Merge pull request #19 from defi-wonderland/chore/setup-medusa

    Chore: setup medusa + 1 basic fuzz scenario
    0xteddybear authored Aug 21, 2024
    Configuration menu
    Copy the full SHA
    407cc76 View commit details
    Browse the repository at this point in the history

Commits on Aug 23, 2024

  1. feat: halmos symbolic tests (#21)

    * feat: introduce OptimismSuperchainERC20
    
    * fix: contract fixes
    
    * feat: add snapshots and semver
    
    * test: add supports interface tests
    
    * test: add invariant test
    
    * feat: add parameters to the RelayERC20 event
    
    * fix: typo
    
    * fix: from param description
    
    * fix: event signature and interface pragma
    
    * feat: add initializer
    
    * feat: use unstructured storage and OZ v5
    
    * feat: update superchain erc20 interfaces
    
    * fix: adapt storage to ERC7201
    
    * test: add initializable OZ v5 test
    
    * fix: invariant docs
    
    * fix: ERC165 implementation
    
    * test: improve superc20 invariant (#11)
    
    * fix: gas snapshot
    
    * chore: configure medusa with basic supERC20 self-bridging
    
    - used --foundry-compile-all to ensure the test contract under
      `test/properties` is compiled (otherwise it is not compiled and medusa
      crashes when it can't find it's compiled representation)
    - set src,test,script to test/properties/medusa to not waste time
      compiling contracts that are not required for the medusa campaign
    - used an atomic bridge, which doesnt allow for testing of several of
      the proposed invariants
    
    * fix: delete dead code
    
    * test: give the fuzzer a head start
    
    * feat: create suite for sybolic tests with halmos
    
    * test: setup and 3 properties with symbolic tests
    
    * chore: remove todo comment
    
    * docs: fix properties order
    
    * test: document & implement assertions 22, 23  and 24
    
    * fix: fixes from self-review
    
    * test: guide the fuzzer a little bit less
    
    previously: initial mint, bound on transfer amount: 146625 calls in 200s
    now: no initial mint, no bound on transfer amount: 176835 calls in 200s
    
    it doesn't seem to slow the fuzzer down
    
    * feat: add property for burn
    
    * refactor: remove symbolic address on mint property
    
    * refactor: order the tests based on the property id
    
    * feat: checkpoint
    
    * chore: set xdomain sender on failing test
    
    * chore: enhance mocks
    
    * Revert "Merge branch 'chore/setup-medusa' into feat/halmos-symbolic-tests"
    
    This reverts commit 945d6b6, reversing
    changes made to 5dcb3a8.
    
    * refactor: remove symbolic addresses to make all of the test work
    
    * chore: remove console logs
    
    * feat: add properties file
    
    * chore: polish
    
    * refactor: enhance test on property 7 using direct try catch (now works)
    
    * fix: review comments
    
    * refactor: add symbolic addresses on test functions
    
    * feat: create halmos toml
    
    * chore: polish test contract and mock
    
    * chore: update property
    
    * refactor: move symbolic folder into properties one
    
    * feat: create advanced tests helper contract
    
    * refactor: enhance tests using symbolic addresses instead of concrete ones
    
    * chore: remove 0 property natspec
    
    * feat: add halmos profile and just script
    
    * chore: rename symbolic folder to halmos
    
    * feat: add halmos commands to justfile
    
    * chore: reorder assertions on one test
    
    * refactor: complete test property seven
    
    * chore: mark properties as completed
    
    * chore: add halmos-cheatcodes dependency
    
    * chore: rename advancedtest->halmosbase
    
    * chore: minimize mocked messenger
    
    * chore: delete empty halmos file
    
    * chore: revert changes to medusa.json
    
    * docs: update changes to PROPERTIES.md from base branch
    
    * test: sendERC20 destination fix
    
    * chore: natspec fixes
    
    ---------
    
    Co-authored-by: agusduha <[email protected]>
    Co-authored-by: 0xng <[email protected]>
    Co-authored-by: teddy <[email protected]>
    4 people authored Aug 23, 2024
    Configuration menu
    Copy the full SHA
    7e6fdbc View commit details
    Browse the repository at this point in the history

Commits on Aug 26, 2024

  1. feat: test properties 22 and 23

    * refactor: allow for atomicity on mock messenger
    
    * refactor: cross domain sender logic on mock messenger
    
    * refactor: l2 to l2 caller and messenge sender logic
    
    * chore: remove assumes for removed checks on mock messenger
    0xDiscotech authored and 0xteddybear committed Aug 26, 2024
    Configuration menu
    Copy the full SHA
    773a1d8 View commit details
    Browse the repository at this point in the history

Commits on Aug 29, 2024

  1. Configuration menu
    Copy the full SHA
    8c4e7c6 View commit details
    Browse the repository at this point in the history
  2. feat: setup kontrol

    0xDiscotech committed Aug 29, 2024
    Configuration menu
    Copy the full SHA
    8b379dc View commit details
    Browse the repository at this point in the history

Commits on Sep 1, 2024

  1. Configuration menu
    Copy the full SHA
    c29990e View commit details
    Browse the repository at this point in the history

Commits on Sep 2, 2024

  1. Configuration menu
    Copy the full SHA
    2934238 View commit details
    Browse the repository at this point in the history
  2. Revert "fix(test): init glob var in state diff generator"

    The changes are no longer needed since with the constructor args flag
    it works
    
    This reverts commit 2934238.
    0xDiscotech committed Sep 2, 2024
    Configuration menu
    Copy the full SHA
    98e443a View commit details
    Browse the repository at this point in the history

Commits on Sep 3, 2024

  1. chore: update setup on kontrol tests and add assumes

    * feat: create temporary file to debug symoblic tests with foundry
    0xDiscotech committed Sep 3, 2024
    Configuration menu
    Copy the full SHA
    8307536 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    e40c1c1 View commit details
    Browse the repository at this point in the history

Commits on Sep 4, 2024

  1. Configuration menu
    Copy the full SHA
    342f33f View commit details
    Browse the repository at this point in the history

Commits on Sep 5, 2024

  1. Configuration menu
    Copy the full SHA
    79158b8 View commit details
    Browse the repository at this point in the history
  2. chore: remove event, add a boolean and update cross domain sender vis…

    …ibility on mock messenger
    0xDiscotech committed Sep 5, 2024
    Configuration menu
    Copy the full SHA
    dc0c2c4 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    befba99 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    498f85f View commit details
    Browse the repository at this point in the history

Commits on Sep 6, 2024

  1. Configuration menu
    Copy the full SHA
    51efcda View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    d89717f View commit details
    Browse the repository at this point in the history

Commits on Sep 7, 2024

  1. Configuration menu
    Copy the full SHA
    d6d46da View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    6b83938 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    b4dd8df View commit details
    Browse the repository at this point in the history

Commits on Sep 9, 2024

  1. fix: kontrol toml file

    0xDiscotech committed Sep 9, 2024
    Configuration menu
    Copy the full SHA
    9633e79 View commit details
    Browse the repository at this point in the history
  2. fix: kontrol toml

    0xDiscotech committed Sep 9, 2024
    Configuration menu
    Copy the full SHA
    f6a03ef View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    6a9b8bd View commit details
    Browse the repository at this point in the history

Commits on Sep 10, 2024

  1. Configuration menu
    Copy the full SHA
    b6a4b94 View commit details
    Browse the repository at this point in the history
  2. chore: remove halmos

    0xDiscotech committed Sep 10, 2024
    Configuration menu
    Copy the full SHA
    a9b3050 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    8e39079 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    6342513 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    763a538 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    113bb45 View commit details
    Browse the repository at this point in the history

Commits on Sep 11, 2024

  1. Configuration menu
    Copy the full SHA
    16d1975 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    ccfa037 View commit details
    Browse the repository at this point in the history

Commits on Sep 12, 2024

  1. Configuration menu
    Copy the full SHA
    e39284c View commit details
    Browse the repository at this point in the history

Commits on Sep 13, 2024

  1. Configuration menu
    Copy the full SHA
    413ae97 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    8fac159 View commit details
    Browse the repository at this point in the history
  3. feat: write test for property 5

    * refactor: update setup
    
    * chore: create optimism superchain erc20 mock contract with compatible compiler version
    
    * refactor: update 3 and 4 properties tests
    0xDiscotech committed Sep 13, 2024
    Configuration menu
    Copy the full SHA
    984947c View commit details
    Browse the repository at this point in the history

Commits on Sep 16, 2024

  1. Configuration menu
    Copy the full SHA
    9c914ef View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    d0fc92b View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    a4d6cd1 View commit details
    Browse the repository at this point in the history

Commits on Sep 17, 2024

  1. Configuration menu
    Copy the full SHA
    602589f View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    b714f0e View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    289370d View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    28d1e71 View commit details
    Browse the repository at this point in the history

Commits on Sep 19, 2024

  1. Configuration menu
    Copy the full SHA
    e0dc0d3 View commit details
    Browse the repository at this point in the history
  2. fix: conflicts

    0xDiscotech committed Sep 19, 2024
    Configuration menu
    Copy the full SHA
    1278f03 View commit details
    Browse the repository at this point in the history
  3. chore: update tests names

    0xDiscotech committed Sep 19, 2024
    Configuration menu
    Copy the full SHA
    e2a25c7 View commit details
    Browse the repository at this point in the history