Skip to content

Commit

Permalink
Merge pull request #139 from morpho-org/certora/update-verification
Browse files Browse the repository at this point in the history
[Certora] Update verification
  • Loading branch information
MathisGD authored Jul 1, 2024
2 parents 0b65392 + dedf746 commit a5050ef
Show file tree
Hide file tree
Showing 13 changed files with 40 additions and 66 deletions.
23 changes: 12 additions & 11 deletions .github/workflows/certora.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,14 @@ jobs:
verify:
runs-on: ubuntu-latest

strategy:
fail-fast: false

matrix:
conf:
- DllFifo
- DllSimple

steps:
- uses: actions/checkout@v3

Expand All @@ -26,20 +34,13 @@ jobs:
run: |
wget https://github.com/ethereum/solidity/releases/download/v0.8.17/solc-static-linux
chmod +x solc-static-linux
sudo mv solc-static-linux /usr/local/bin/solc8.17
sudo mv solc-static-linux /usr/local/bin/solc-0.8.17
- name: Verify rule ${{ matrix.script }}
run: |
echo "key length" ${#CERTORAKEY}
bash certora/scripts/${{ matrix.script }} --solc solc8.17
make -C certora munged-simple
make -C certora munged-fifo
certoraRun certora/confs/${{ matrix.conf }}.conf
env:
CERTORAKEY: ${{ secrets.CERTORAKEY }}

strategy:
fail-fast: false
max-parallel: 4

matrix:
script:
- dll-fifo.sh
- dll-simple.sh
2 changes: 1 addition & 1 deletion .github/workflows/ci-foundry.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,4 @@ jobs:
run: python3 -m pip install --upgrade halmos

- name: Run halmos
run: halmos --function testProve --loop 4 --symbolic-storage --error-unknown --test-parallel --solver-parallel --solver-timeout-assertion 0
run: halmos --function testProve --loop 4 --symbolic-storage --test-parallel --solver-parallel --solver-timeout-assertion 0
File renamed without changes.
12 changes: 12 additions & 0 deletions certora/confs/DllFifo.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"files": [
"certora/munged-fifo/MockDLL.sol",
],
"solc": "solc-0.8.17",
"verify": "MockDLL:certora/specs/DllFifo.spec",
"loop_iter": "4",
"optimistic_loop": true,
"rule_sanity": "basic",
"server": "production",
"msg": "FIFO DLL",
}
12 changes: 12 additions & 0 deletions certora/confs/DllSimple.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"files": [
"certora/munged-simple/MockDLL.sol",
],
"solc": "solc-0.8.17",
"verify": "MockDLL:certora/specs/DllSimple.spec",
"loop_iter": "7",
"optimistic_loop": true,
"rule_sanity": "basic",
"server": "production",
"msg": "Simple DLL",
}
6 changes: 3 additions & 3 deletions certora/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ munged-simple: $(wildcard ../src/*.sol) applyHarnessSimple.patch
record-simple:
diff -ruN ../src munged-simple | sed 's+\.\./src/++g' | sed 's+munged-simple/++g' > applyHarnessSimple.patch

munged-fifo: $(wildcard ../src/*.sol) applyHarnessFIFO.patch
munged-fifo: $(wildcard ../src/*.sol) applyHarnessFifo.patch
@rm -rf munged-fifo
@cp -r ../src munged-fifo
@patch -p0 -d munged-fifo < applyHarnessFIFO.patch
@patch -p0 -d munged-fifo < applyHarnessFifo.patch

record-fifo:
diff -ruN ../src munged-fifo | sed 's+\.\./src/++g' | sed 's+munged-fifo/++g' > applyHarnessFIFO.patch
diff -ruN ../src munged-fifo | sed 's+\.\./src/++g' | sed 's+munged-fifo/++g' > applyHarnessFifo.patch

clean:
rm -rf munged-simple munged-fifo
Expand Down
11 changes: 0 additions & 11 deletions certora/scripts/dll-fifo.sh

This file was deleted.

11 changes: 0 additions & 11 deletions certora/scripts/dll-simple.sh

This file was deleted.

11 changes: 0 additions & 11 deletions certora/scripts/sanity-fifo.sh

This file was deleted.

11 changes: 0 additions & 11 deletions certora/scripts/sanity-simple.sh

This file was deleted.

File renamed without changes.
File renamed without changes.
7 changes: 0 additions & 7 deletions certora/specs/sanity.spec

This file was deleted.

0 comments on commit a5050ef

Please sign in to comment.