Skip to content

Feat: add Certora specs #7

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

Open
wants to merge 99 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
99 commits
Select commit Hold shift + click to select a range
e62ac29
initial implementation
oddaf Feb 14, 2025
13e9d95
Update script/input/1/README.md
oddaf Feb 18, 2025
2d4ff02
Update src/DSPC.sol
oddaf Feb 18, 2025
2bccdbe
Update src/DSPC.sol
oddaf Feb 18, 2025
2c3f886
Update src/DSPC.sol
oddaf Feb 18, 2025
3c60b1f
Update src/DSPC.sol
oddaf Feb 18, 2025
52a59f7
refactor: rename function put to set
oddaf Feb 18, 2025
c04ef6c
fix: add check if data can be safely cast to uint16 in file()
oddaf Feb 18, 2025
d6ff178
refactor: remove step restriction
oddaf Feb 18, 2025
b341255
chore: forge fmt
oddaf Feb 18, 2025
917eb4d
refactor: Update Set event to be emitted for each rate update
oddaf Feb 18, 2025
def70fa
Update src/deployment/DSPCInstance.sol
oddaf Feb 19, 2025
9c2898d
Update src/deployment/DSPCInit.sol
oddaf Feb 19, 2025
b6c57c0
Update src/deployment/DSPCInit.sol
oddaf Feb 19, 2025
253af36
Update src/deployment/DSPCDeploy.sol
oddaf Feb 19, 2025
45a1834
Update src/deployment/DSPCDeploy.sol
oddaf Feb 19, 2025
cec6dc4
Update src/deployment/DSPCDeploy.sol
oddaf Feb 19, 2025
48b668a
Update src/deployment/DSPCInit.sol
oddaf Feb 19, 2025
b9482c3
refactor: use addresses instead of interfaces in DSPCInstance to ease…
oddaf Feb 19, 2025
2274abe
fix: enforce min < max and max > min on file()
oddaf Feb 19, 2025
75211ed
fix: typo in RelyLike
oddaf Feb 21, 2025
3d3a515
Update src/DSPC.sol
oddaf Feb 21, 2025
b7dadb5
feat: dspc cooldown + step
oddaf Feb 24, 2025
0582668
remove unnecessary setup from dspcMom test
oddaf Feb 24, 2025
e03048f
chore: forge fmt
oddaf Feb 24, 2025
d685819
Apply suggestions from code review
oddaf Feb 24, 2025
9dcf622
fix: revert message in test
oddaf Feb 24, 2025
0a79139
chore: forge fmt
oddaf Feb 24, 2025
a47d4ff
feat: improvements to initialization script
oddaf Feb 26, 2025
4077e06
Apply suggestions from code review
oddaf Mar 6, 2025
117aa00
chore: adjust tests for new var names
oddaf Mar 6, 2025
a1b8da7
chore: improve DSPCInit natspec
oddaf Mar 6, 2025
12d2bfd
feat: add bud address to DSPCConfig
oddaf Mar 6, 2025
c64ce03
fix: Remove setAuthority from deploy script in favor of only executin…
oddaf Mar 6, 2025
4f5bd78
Update src/DSPC.sol
oddaf Mar 7, 2025
bfc5de0
refactor: optimize storage layout
oddaf Mar 7, 2025
f6c7987
Update src/DSPC.sol
oddaf Mar 7, 2025
1d08161
chore: test case for tau overflow in file()
oddaf Mar 7, 2025
43ed724
fix: prevent duplicate ilks
oddaf Mar 10, 2025
c81e895
chore: fix natspec
oddaf Mar 10, 2025
4fc314a
chore: fix readme reference to SUSDS
oddaf Mar 10, 2025
cfe098a
refactor: fisibility of _cfgs to public
oddaf Mar 10, 2025
d45a82d
fix: check if ilk setup on set()
oddaf Mar 10, 2025
f6d6d67
chore: Add comment to file function (ilks) mentioned order of calls m…
oddaf Mar 10, 2025
827b25f
Update src/DSPC.sol
oddaf Mar 11, 2025
7342217
Update src/DSPC.t.sol
oddaf Mar 11, 2025
15e83c3
fix: update revert reason in test_revert_set_not_configured_rate
oddaf Mar 11, 2025
990ac84
fix: prevent setup of unexisting Ilks
oddaf Mar 11, 2025
94af8f0
refactor: ordering of ilks check
oddaf Mar 11, 2025
a67531b
refactor: improve invalid bad check
oddaf Mar 11, 2025
e5177a9
chore: improve natspec dos for file(what, data)
oddaf Mar 11, 2025
ea0b5f3
refactor: order of checks on set()
oddaf Mar 11, 2025
a72e855
fix: ilk initialization verification
oddaf Mar 12, 2025
6d0cf28
feat: allow ward to edit toc
oddaf Mar 13, 2025
61c6c88
feat: revert if current rate outside range
oddaf Mar 13, 2025
7145e55
Apply suggestions from code review
oddaf Mar 13, 2025
aec447a
Update src/mocks/ConvMock.sol
oddaf Mar 13, 2025
d9d9b5a
chore: update natspec of set() to include all cases where it reverts
oddaf Mar 13, 2025
1d678cb
chore: improve tests
oddaf Mar 14, 2025
d9612a6
chore: natspec
oddaf Mar 14, 2025
31512e2
chore: add step to readme.md instructions
oddaf Mar 14, 2025
2af4fe2
Update README.md
oddaf Mar 14, 2025
afc6f55
Apply suggestions from code review
oddaf Mar 14, 2025
8c0131b
Update README.md
oddaf Mar 14, 2025
50fd0d4
chore: order of operations in readme instructions
oddaf Mar 14, 2025
454136e
Merge branch 'initial-implementation' of https://github.com/dewiz-xyz…
oddaf Mar 14, 2025
13bc3b4
chore: order natspec revert reasons
oddaf Mar 14, 2025
473fffb
chore: update foundry.toml
oddaf Mar 14, 2025
4587323
chore: formatting
oddaf Mar 14, 2025
b7d6a98
chore: remove redundant selectors from test_auth_methods
oddaf Mar 14, 2025
aae64b8
chore: add .editorconfig
oddaf Mar 17, 2025
1f8b03c
Apply suggestions from code review
oddaf Mar 17, 2025
5650c3f
feat: rate covnersion check
oddaf Mar 17, 2025
4da6795
chore: forge fmt
oddaf Mar 17, 2025
e8c317b
refactor: allow setting rates when current rate out of bounds
oddaf Mar 18, 2025
84e5e3b
chore: test rates below min bound
oddaf Mar 18, 2025
54dacb4
chore: formatting
oddaf Mar 18, 2025
c9dfdfb
Apply suggestions from code review
oddaf Mar 19, 2025
6f00f00
feat: add initial spec [WIP]
amusingaxl Mar 20, 2025
abd5b5e
feat: include additional rules and harness
amusingaxl Mar 20, 2025
7bcf215
WIP: checkpoint for rules implementation
amusingaxl Mar 27, 2025
25a3475
fix: mocks and specs to allow rule passing
amusingaxl Mar 27, 2025
a808a50
refactor: clean up mocks and spec
amusingaxl Mar 27, 2025
832413a
feat: add remaining rules for edge cases
amusingaxl Mar 27, 2025
e78be14
chore: formatting
amusingaxl Mar 28, 2025
b156c66
refactor: formatting and cleanup
amusingaxl Mar 28, 2025
57f95dc
feat: add Certora CI action
amusingaxl Mar 28, 2025
4e7a435
Rename module (DSPC -> SPBEAM) (#9)
oddaf Mar 28, 2025
2d04d2e
Rename module (DSPC -> SPBEAM) (#9)
oddaf Mar 28, 2025
fcb2478
refactor: rename DSPC to SPBEAM
amusingaxl Mar 28, 2025
4507d0f
fix: remove `MockerBrokenConv` override
amusingaxl Mar 28, 2025
ab956ec
Merge branch 'initial-implementation' into feat/certora-spec
amusingaxl Mar 28, 2025
e6ff425
refactor: revert mock implementation change
amusingaxl Mar 28, 2025
59a1f48
refactor: improve and cleanup rules
amusingaxl Apr 1, 2025
a4b7919
feat(file_per_id): add assertions for keeping other params unchanged
amusingaxl Apr 10, 2025
b3b2247
refactor(set): remove require on updates.length
amusingaxl Apr 10, 2025
f0f2ea9
refactor(set_revert): apply suggestions from code review
amusingaxl Apr 10, 2025
67d5fbc
feat(invariants): add rules check on invariants for the rates being set
amusingaxl Apr 10, 2025
d8523fc
Merge branch 'master' into feat/certora-spec
amusingaxl Apr 22, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*.spec linguist-language=Solidity
*.conf linguist-detectable
*.conf linguist-language=JSON5
46 changes: 46 additions & 0 deletions .github/workflows/certora.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Certora

on: [push, pull_request]

jobs:
certora:
name: Certora
runs-on: ubuntu-latest
strategy:
fail-fast: false

steps:
- name: Checkout
uses: actions/checkout@v3

- uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '11'
java-package: jre

- name: Set up Python 3.13
uses: actions/setup-python@v4
with:
python-version: 3.13

- name: Install solc-select
run: pip3 install solc-select

- name: Solc Select 0.8.24
run: solc-select install 0.8.24

- name: Solc Select 0.8.21
run: solc-select install 0.8.21

- name: Solc Select 0.5.12
run: solc-select install 0.5.12

- name: Install Certora
run: pip3 install certora-cli-beta

- name: Certora verify SPBEAM
run: make certora-spbeam
env:
CERTORAKEY: ${{ secrets.CERTORAKEY }}

5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,7 @@ docs/
# Ignores script config
/script/input/**/*.json
!/script/input/**/template-*.json
/script/output/**/*.json
/script/output/**/*.json

# Certora
.certora_internal/
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
PATH := ~/.solc-select/artifacts/solc-0.8.24:~/.solc-select/artifacts/solc-0.8.21:~/.solc-select/artifacts/solc-0.5.12:~/.solc-select/artifacts:$(PATH)
certora-spbeam:; PATH=${PATH} certoraRun certora/SPBEAM.conf$(if $(rule), --rule $(rule),)

57 changes: 57 additions & 0 deletions certora/SPBEAM.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
{
"files": [
"src/SPBEAM.sol",
"certora/mocks/Conv.sol",
"certora/mocks/Jug.sol",
"certora/mocks/Pot.sol",
"certora/mocks/SUsds.sol",
"certora/mocks/Usds.sol",
"certora/mocks/UsdsJoin.sol",
"certora/mocks/Vat.sol"
],
"link": [
"Jug:vat=Vat",
"Pot:vat=Vat",
"SUsds:vat=Vat",
"UsdsJoin:usds=Usds",
"UsdsJoin:vat=Vat",
"SPBEAM:jug=Jug",
"SPBEAM:pot=Pot",
"SPBEAM:susds=SUsds",
"SPBEAM:conv=Conv"
],
"solc_map": {
"Conv": "solc-0.8.24",
"SPBEAM": "solc-0.8.24",
"Jug": "solc-0.5.12",
"Pot": "solc-0.5.12",
"SUsds": "solc-0.8.21",
"Usds": "solc-0.8.21",
"UsdsJoin": "solc-0.8.21",
"Vat": "solc-0.5.12"
},
"solc_optimize_map": {
"Conv": "200",
"SPBEAM": "200",
"Jug": "0",
"Pot": "0",
"SUsds": "200",
"Usds": "200",
"UsdsJoin": "200",
"Vat": "0"
},
"verify": "SPBEAM:certora/SPBEAM.spec",
"parametric_contracts": [
"SPBEAM"
],
"build_cache": true,
"loop_iter": "3",
"multi_assert_check": true,
"optimistic_loop": true,
"process": "emv",
"prover_args": [
" -rewriteMSizeAllocations true"
],
"rule_sanity": "basic",
"wait_for_results": "all"
}
Loading