Skip to content

Commit c5bdb40

Browse files
miguelmtzinfnisnisleviDhairyaSethi
authored
fix: upgrade certora prover version to 7.26.0 (#93)
* fix: upgrade prover version to 7.26.0 * test: Fix test with memory accesses * fix: Upgrade erc4626 tests dep * test: fix deployer create prediction, always run in isolate mode (#94) * fix: fix deployer create prediction, always run in isolate mode * feat: upd ci --------- Co-authored-by: Nissan Levi <[email protected]> Co-authored-by: dhairya <[email protected]>
1 parent c7b416b commit c5bdb40

39 files changed

+577
-633
lines changed

.github/workflows/certora.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,11 @@ on:
44
push:
55
branches:
66
- main
7+
- certora
78
pull_request:
89
branches:
910
- main
11+
- certora
1012

1113
workflow_dispatch:
1214

@@ -15,7 +17,7 @@ jobs:
1517
runs-on: ubuntu-latest
1618

1719
steps:
18-
- uses: actions/checkout@v2
20+
- uses: actions/checkout@v4
1921
with:
2022
submodules: recursive
2123

@@ -33,7 +35,7 @@ jobs:
3335
with: { java-version: "11", java-package: jre }
3436

3537
- name: Install certora cli
36-
run: pip3 install certora-cli==3.6.8.post3
38+
run: pip3 install certora-cli==7.26.0
3739

3840
- name: Install solc
3941
run: |

.github/workflows/foundry-gas-diff.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@ jobs:
1717
compare_gas_reports:
1818
runs-on: ubuntu-latest
1919
steps:
20-
- uses: actions/checkout@v3
20+
- uses: actions/checkout@v4
2121
with:
2222
submodules: recursive
2323

2424
- name: Install Foundry
2525
uses: onbjerg/foundry-toolchain@v1
2626
with:
27-
version: nightly
27+
version: stable
2828

2929
# Add any step generating a gas report to a temporary file named gasreport.ansi
3030
# For example:
@@ -38,7 +38,7 @@ jobs:
3838
FOUNDRY_FUZZ_SEED: 0x${{ github.event.pull_request.base.sha || github.sha }}
3939

4040
- name: Compare gas reports
41-
uses: Rubilmax/foundry-gas-diff@v3.11
41+
uses: Rubilmax/foundry-gas-diff@v3.21
4242
with:
4343
sortCriteria: avg,max # optionnally sort diff rows by criteria
4444
sortOrders: desc,asc # and directions
@@ -51,4 +51,4 @@ jobs:
5151
with:
5252
# delete the comment in case changes no longer impact gas costs
5353
delete: ${{ !steps.gas_diff.outputs.markdown }}
54-
message: ${{ steps.gas_diff.outputs.markdown }}
54+
message: ${{ steps.gas_diff.outputs.markdown }}

.github/workflows/tests.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ jobs:
66
tests:
77
runs-on: ubuntu-latest
88
steps:
9-
- uses: actions/checkout@v2
9+
- uses: actions/checkout@v4
1010

1111
- name: Install Foundry
1212
uses: onbjerg/foundry-toolchain@v1
1313
with:
14-
version: nightly
14+
version: stable
1515

1616
- name: Install dependencies
1717
run: forge install
@@ -23,4 +23,4 @@ jobs:
2323
env:
2424
POLYGON_RPC_URL: ${{ secrets.POLYGON_RPC_URL }}
2525
AVALANCHE_RPC_URL: ${{ secrets.AVALANCHE_RPC_URL }}
26-
run: forge test -vv
26+
run: forge test -vvv

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,6 @@
66
.env
77
.DS_Store
88
.gas-snapshot
9-
lcov.info
9+
lcov.info
10+
.certora_internal/
11+
.certora_recent_jobs.json

.gitmodules

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,6 @@
1111
path = lib/aave-v3-core
1212
url = https://github.com/aave/aave-v3-core
1313
branch = v1.17.1
14-
[submodule "lib/erc4626-tests"]
15-
path = lib/erc4626-tests
16-
url = https://github.com/a16z/erc4626-tests
1714
[submodule "lib/aave-v3-periphery"]
1815
path = lib/aave-v3-periphery
1916
url = https://github.com/aave/aave-v3-periphery
@@ -22,3 +19,6 @@
2219
path = lib/openzeppelin-contracts-upgradeable
2320
url = https://github.com/openzeppelin/openzeppelin-contracts-upgradeable
2421
branch = v4.8.1
22+
[submodule "lib/erc4626-tests"]
23+
path = lib/erc4626-tests
24+
url = https://github.com/a16z/erc4626-tests

certora/conf/accrueYieldCheck.conf

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,20 +23,14 @@
2323
"@openzeppelin-upgradeable=certora/munged/lib/openzeppelin-contracts-upgradeable/contracts",
2424
"@openzeppelin=certora/munged/lib/openzeppelin-contracts/contracts"
2525
],
26-
"verify": ["ATokenVaultHarness:certora/specs/accrueYieldCheck.spec"],
27-
"rule": ["accrueYieldCheck"],
2826
"optimistic_loop": true,
27+
"build_cache": true,
2928
"process": "emv",
29+
"rule": ["accrueYieldCheck"],
3030
"rule_sanity": "basic",
31-
"settings": [
32-
"-assumeUnwindCond",
33-
"-depth=15",
34-
"-mediumTimeout=1000",
35-
"-ruleSanityChecks=basic",
36-
"-t=2000"
37-
],
31+
"prover_args": ["-depth 15","-mediumTimeout 1000"],
3832
"smt_timeout": "2000",
3933
"solc": "solc8.10",
40-
"cloud": "" ,
34+
"verify": "ATokenVaultHarness:certora/specs/accrueYieldCheck.spec",
4135
"msg": "accrueYieldCheck"
4236
}

certora/conf/changeInContractBalanceShouldCauseAccrual.conf

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
"SymbolicLendingPoolL1:underlyingToken=DummyERC20_aTokenUnderlying"
1818
],
1919
"msg": "changeInContractBalanceShouldCauseAccrual",
20+
"build_cache": true,
2021
"optimistic_loop": true,
2122
"packages": [
2223
"@aave-v3-core=certora/munged/lib/aave-v3-core/contracts",
@@ -30,18 +31,8 @@
3031
"changeInContractBalanceShouldCauseAccrual"
3132
],
3233
"rule_sanity": "basic",
33-
"settings": [
34-
"-assumeUnwindCond",
35-
"-depth=15",
36-
"-mediumTimeout=1000",
37-
"-rule=changeInContractBalanceShouldCauseAccrual",
38-
"-ruleSanityChecks=basic",
39-
"-t=2000"
40-
],
34+
"prover_args": ["-depth 15","-mediumTimeout 1000"],
4135
"smt_timeout": "2000",
4236
"solc": "solc8.10",
43-
"cloud": "" ,
44-
"verify": [
45-
"ATokenVaultHarness:certora/specs/changeInContractBalanceShouldCauseAccrual.spec"
46-
]
37+
"verify": "ATokenVaultHarness:certora/specs/changeInContractBalanceShouldCauseAccrual.spec"
4738
}

certora/conf/erc4626-previewOPERATIONS.conf

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -24,21 +24,17 @@
2424
"@openzeppelin-upgradeable=certora/munged/lib/openzeppelin-contracts-upgradeable/contracts",
2525
"@openzeppelin=certora/munged/lib/openzeppelin-contracts/contracts"
2626
],
27+
"build_cache": true,
2728
"process": "emv",
2829
"rule": [
29-
"previewMint_amount_check","previewDeposit_amount_check","previewWithdraw_amount_check","previewRedeem_amount_check"
30-
],
31-
"settings": [
32-
"-assumeUnwindCond",
33-
"-depth=15",
34-
"-mediumTimeout=1000",
35-
"-t=2000"
30+
"previewDeposit_amount_check",
31+
"previewMint_amount_check",
32+
"previewWithdraw_amount_check",
33+
"previewRedeem_amount_check"
3634
],
35+
"prover_args": ["-depth 15","-mediumTimeout 1000"],
3736
"smt_timeout": "2000",
3837
"solc": "solc8.10",
39-
"cloud": "" ,
40-
"verify": [
41-
"ATokenVaultHarness:certora/specs/erc4626.spec"
42-
],
43-
"msg": "previewOPERATION_amount_check"
38+
"verify": "ATokenVaultHarness:certora/specs/erc4626.spec",
39+
"msg": "ERC4626: previewOPERATION_amount_check"
4440
}

certora/conf/fees_LEQ_ATokenBal.conf

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,18 +23,12 @@
2323
"@openzeppelin-upgradeable=certora/munged/lib/openzeppelin-contracts-upgradeable/contracts",
2424
"@openzeppelin=certora/munged/lib/openzeppelin-contracts/contracts"
2525
],
26-
"cloud": "",
26+
"build_cache": true,
2727
"optimistic_loop": true,
2828
"process": "emv",
29-
"settings": [
30-
"-assumeUnwindCond",
31-
"-depth=15",
32-
"-mediumTimeout=1000",
33-
"-t=2000"
34-
],
29+
"prover_args": ["-depth 15","-mediumTimeout 1000"],
3530
"smt_timeout": "2000",
3631
"solc": "solc8.10",
37-
"verify": ["ATokenVaultHarness:certora/specs/fees_LEQ_ATokenBal.spec"],
38-
"rule": ["getCLMFees_LEQ_ATokenBAL_DM_other","getCLMFees_LEQ_ATokenBAL_RW"],
39-
"msg": "getclaimablefees LEQ Atoken.Balanceof[Vault]"
40-
}
32+
"verify": "ATokenVaultHarness:certora/specs/fees_LEQ_ATokenBal.spec",
33+
"msg": "getclaimablefees LEQ Atoken.Balanceof[Vault] getCLMFees_LEQ_ATokenBAL_DM_other for DEV - CVL2"
34+
}

certora/conf/lastVaultBalance_LEQ_ATokenBalThis.conf

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
"SymbolicLendingPoolL1:aToken=AToken",
1818
"SymbolicLendingPoolL1:underlyingToken=DummyERC20_aTokenUnderlying"
1919
],
20+
"build_cache": true,
21+
"optimistic_loop": true,
2022
"packages": [
2123
"@aave-v3-core=certora/munged/lib/aave-v3-core/contracts",
2224
"@aave-v3-periphery=certora/munged/lib/aave-v3-periphery/contracts",
@@ -25,19 +27,12 @@
2527
"@openzeppelin=certora/munged/lib/openzeppelin-contracts/contracts"
2628
],
2729
"process": "emv",
28-
"optimistic_loop": true,
29-
"settings": [
30-
"-assumeUnwindCond",
31-
"-depth=15",
32-
"-mediumTimeout=1000",
33-
"-rule=lastVaultBalance_LEQ_ATokenBalThis",
34-
"-t=2000"
30+
"rule": [
31+
"lastVaultBalance_LEQ_ATokenBalThis"
3532
],
33+
"prover_args": ["-depth 15","-mediumTimeout 1000"],
3634
"smt_timeout": "2000",
3735
"solc": "solc8.10",
38-
"cloud": "" ,
39-
"verify": ["ATokenVaultHarness:certora/specs/lastVaultBal_LEQ_ATokenBalThis.spec"],
40-
"disableLocalTypeChecking": false,
41-
"rule": ["lastVaultBalance_LEQ_ATokenBalThis"],
42-
"msg": "_s.lastVaultBalance LEQ AToken.balance[this] accurate assertion"
36+
"verify": "ATokenVaultHarness:certora/specs/lastVaultBal_LEQ_ATokenBalThis.spec",
37+
"msg": "_s.lastVaultBalance LEQ AToken.balance[this] example for DEV - CVL2",
4338
}

0 commit comments

Comments
 (0)