diff --git a/.github/workflows/venom-halmos.yml b/.github/workflows/venom-halmos.yml index 297ac3a7..f5af520b 100644 --- a/.github/workflows/venom-halmos.yml +++ b/.github/workflows/venom-halmos.yml @@ -4,7 +4,7 @@ on: schedule: - cron: "30 3 * * *" workflow_dispatch: - # To be removed before merging. + # To be removed before merging! push: concurrency: @@ -37,7 +37,7 @@ jobs: python-version: ${{ matrix.python_version }} architecture: ${{ matrix.architecture }} - - name: Activate `venom` backend + - name: Activate Venom backend run: python scripts/insert_venom_pragma.py - name: Install Vyper @@ -69,24 +69,24 @@ jobs: - name: Show the Foundry Halmos config run: forge config env: - FOUNDRY_PROFILE: venom-halmos + FOUNDRY_PROFILE: halmos-venom - name: Run Halmos ERC-20 symbolic tests run: halmos --contract ERC20TestHalmos ${{ matrix.halmos }} env: - FOUNDRY_PROFILE: venom-halmos + FOUNDRY_PROFILE: halmos-venom - name: Run Halmos ERC-721 symbolic tests run: halmos --contract ERC721TestHalmos ${{ matrix.halmos }} env: - FOUNDRY_PROFILE: venom-halmos + FOUNDRY_PROFILE: halmos-venom - name: Run Halmos ERC-1155 symbolic tests run: halmos --contract ERC1155TestHalmos ${{ matrix.halmos }} env: - FOUNDRY_PROFILE: venom-halmos + FOUNDRY_PROFILE: halmos-venom - name: Run Halmos math symbolic tests run: halmos --contract MathTestHalmos ${{ matrix.halmos }} env: - FOUNDRY_PROFILE: venom-halmos + FOUNDRY_PROFILE: halmos-venom diff --git a/.github/workflows/venom-test-contracts.yml b/.github/workflows/venom-test-contracts.yml index d2ff9cb4..fe5981f6 100644 --- a/.github/workflows/venom-test-contracts.yml +++ b/.github/workflows/venom-test-contracts.yml @@ -34,7 +34,7 @@ jobs: python-version: ${{ matrix.python_version }} architecture: ${{ matrix.architecture }} - - name: Activate `venom` backend + - name: Activate Venom backend run: python scripts/insert_venom_pragma.py - name: Install Vyper @@ -74,12 +74,12 @@ jobs: - name: Show the Foundry CI config run: forge config env: - FOUNDRY_PROFILE: venom + FOUNDRY_PROFILE: ci-venom - name: Foundry tests run: forge test env: - FOUNDRY_PROFILE: venom + FOUNDRY_PROFILE: ci-venom - name: Show the Foundry default config run: forge config @@ -103,19 +103,19 @@ jobs: - name: Show the Foundry Echidna config run: forge config env: - FOUNDRY_PROFILE: venom-echidna + FOUNDRY_PROFILE: echidna-venom - name: Compile the Echidna test contracts run: forge build --build-info env: - FOUNDRY_PROFILE: venom-echidna + FOUNDRY_PROFILE: echidna-venom - name: Run Echidna ERC-20 property tests run: echidna test/tokens/echidna/ERC20Properties.sol --contract CryticERC20ExternalHarness ${{ matrix.echidna }} env: - FOUNDRY_PROFILE: venom-echidna + FOUNDRY_PROFILE: echidna-venom - name: Run Echidna ERC-721 property tests run: echidna test/tokens/echidna/ERC721Properties.sol --contract CryticERC721ExternalHarness ${{ matrix.echidna }} env: - FOUNDRY_PROFILE: venom-echidna + FOUNDRY_PROFILE: echidna-venom diff --git a/foundry.toml b/foundry.toml index ece5e67f..88932d78 100644 --- a/foundry.toml +++ b/foundry.toml @@ -38,28 +38,26 @@ evm_version = "shanghai" # Set the EVM t force = true # Perform always a clean build. evm_version = "shanghai" # Set the EVM target version to `shanghai`. -#### THE PROFILES BELOW ARE TEMPORARY - WILL DELETE BEFORE MERGING - # Default overrides for the Venom-based tests. [profile.default-venom] -skip = ["src/snekmate/**/*.vy", "src/snekmate/**/*.vyi"] # Skip the compilation of all Vyper files (to be removed before merging). +vyper = { experimental_codegen = true } # Enable experimental code generation using the Venom backend. -# Default overrides for the Venom-based fuzz tests. -[profile.venom] +# Default overrides for the Venom-based CI tests. +[profile.ci-venom] force = true # Perform always a clean build. verbosity = 4 # Increase the verbosity level for the tests. fuzz = { runs = 10_000, max_test_rejects = 350_000 } # Increase the number of fuzz runs and maximum number of combined inputs that may be rejected for the tests. invariant = { runs = 375, depth = 500 } # Increase the number of runs (while preserving the default depth) for each invariant test group. -skip = ["src/snekmate/**/*.vy", "src/snekmate/**/*.vyi"] # Skip the compilation of all Vyper files (to be removed before merging). +vyper = { experimental_codegen = true } # Enable experimental code generation using the Venom backend. -# Default overrides for the Halmos tests. -[profile.venom-halmos] +# Default overrides for the the Venom-based Echidna tests. +[profile.echidna-venom] force = true # Perform always a clean build. evm_version = "shanghai" # Set the EVM target version to `shanghai`. -skip = ["src/snekmate/**/*.vy", "src/snekmate/**/*.vyi"] # Skip the compilation of all Vyper files (to be removed before merging). +vyper = { experimental_codegen = true } # Enable experimental code generation using the Venom backend. -# Default overrides for the Echidna tests. -[profile.venom-echidna] +# Default overrides for the Venom-based Halmos tests. +[profile.halmos-venom] force = true # Perform always a clean build. evm_version = "shanghai" # Set the EVM target version to `shanghai`. -skip = ["src/snekmate/**/*.vy", "src/snekmate/**/*.vyi"] # Skip the compilation of all Vyper files (to be removed before merging). +vyper = { experimental_codegen = true } # Enable experimental code generation using the Venom backend. diff --git a/scripts/insert_venom_pragma.py b/scripts/insert_venom_pragma.py index ae74b59d..d22d030e 100644 --- a/scripts/insert_venom_pragma.py +++ b/scripts/insert_venom_pragma.py @@ -6,7 +6,7 @@ def insert_venom_pragma(filepath): lines = f.readlines() if len(lines) < 2: lines.append("") - # Insert `pragma experimental-codegen` on the second line to activate the `venom` backend. + # Insert `pragma experimental-codegen` on the second line to activate the Venom backend. lines.insert(1, "# pragma experimental-codegen\n") # Move the file pointer back to the beginning of the file. f.seek(0)