-
Notifications
You must be signed in to change notification settings - Fork 2
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
Merged
Merged
Changes from all commits
Commits
Show all changes
101 commits
Select commit
Hold shift + click to select a range
e62ac29
initial implementation
oddaf 13e9d95
Update script/input/1/README.md
oddaf 2d4ff02
Update src/DSPC.sol
oddaf 2bccdbe
Update src/DSPC.sol
oddaf 2c3f886
Update src/DSPC.sol
oddaf 3c60b1f
Update src/DSPC.sol
oddaf 52a59f7
refactor: rename function put to set
oddaf c04ef6c
fix: add check if data can be safely cast to uint16 in file()
oddaf d6ff178
refactor: remove step restriction
oddaf b341255
chore: forge fmt
oddaf 917eb4d
refactor: Update Set event to be emitted for each rate update
oddaf def70fa
Update src/deployment/DSPCInstance.sol
oddaf 9c2898d
Update src/deployment/DSPCInit.sol
oddaf b6c57c0
Update src/deployment/DSPCInit.sol
oddaf 253af36
Update src/deployment/DSPCDeploy.sol
oddaf 45a1834
Update src/deployment/DSPCDeploy.sol
oddaf cec6dc4
Update src/deployment/DSPCDeploy.sol
oddaf 48b668a
Update src/deployment/DSPCInit.sol
oddaf b9482c3
refactor: use addresses instead of interfaces in DSPCInstance to ease…
oddaf 2274abe
fix: enforce min < max and max > min on file()
oddaf 75211ed
fix: typo in RelyLike
oddaf 3d3a515
Update src/DSPC.sol
oddaf b7dadb5
feat: dspc cooldown + step
oddaf 0582668
remove unnecessary setup from dspcMom test
oddaf e03048f
chore: forge fmt
oddaf d685819
Apply suggestions from code review
oddaf 9dcf622
fix: revert message in test
oddaf 0a79139
chore: forge fmt
oddaf a47d4ff
feat: improvements to initialization script
oddaf 4077e06
Apply suggestions from code review
oddaf 117aa00
chore: adjust tests for new var names
oddaf a1b8da7
chore: improve DSPCInit natspec
oddaf 12d2bfd
feat: add bud address to DSPCConfig
oddaf c64ce03
fix: Remove setAuthority from deploy script in favor of only executin…
oddaf 4f5bd78
Update src/DSPC.sol
oddaf bfc5de0
refactor: optimize storage layout
oddaf f6c7987
Update src/DSPC.sol
oddaf 1d08161
chore: test case for tau overflow in file()
oddaf 43ed724
fix: prevent duplicate ilks
oddaf c81e895
chore: fix natspec
oddaf 4fc314a
chore: fix readme reference to SUSDS
oddaf cfe098a
refactor: fisibility of _cfgs to public
oddaf d45a82d
fix: check if ilk setup on set()
oddaf f6d6d67
chore: Add comment to file function (ilks) mentioned order of calls m…
oddaf 827b25f
Update src/DSPC.sol
oddaf 7342217
Update src/DSPC.t.sol
oddaf 15e83c3
fix: update revert reason in test_revert_set_not_configured_rate
oddaf 990ac84
fix: prevent setup of unexisting Ilks
oddaf 94af8f0
refactor: ordering of ilks check
oddaf a67531b
refactor: improve invalid bad check
oddaf e5177a9
chore: improve natspec dos for file(what, data)
oddaf ea0b5f3
refactor: order of checks on set()
oddaf a72e855
fix: ilk initialization verification
oddaf 6d0cf28
feat: allow ward to edit toc
oddaf 61c6c88
feat: revert if current rate outside range
oddaf 7145e55
Apply suggestions from code review
oddaf aec447a
Update src/mocks/ConvMock.sol
oddaf d9d9b5a
chore: update natspec of set() to include all cases where it reverts
oddaf 1d678cb
chore: improve tests
oddaf d9612a6
chore: natspec
oddaf 31512e2
chore: add step to readme.md instructions
oddaf 2af4fe2
Update README.md
oddaf afc6f55
Apply suggestions from code review
oddaf 8c0131b
Update README.md
oddaf 50fd0d4
chore: order of operations in readme instructions
oddaf 454136e
Merge branch 'initial-implementation' of https://github.com/dewiz-xyz…
oddaf 13bc3b4
chore: order natspec revert reasons
oddaf 473fffb
chore: update foundry.toml
oddaf 4587323
chore: formatting
oddaf b7d6a98
chore: remove redundant selectors from test_auth_methods
oddaf aae64b8
chore: add .editorconfig
oddaf 1f8b03c
Apply suggestions from code review
oddaf 5650c3f
feat: rate covnersion check
oddaf 4da6795
chore: forge fmt
oddaf e8c317b
refactor: allow setting rates when current rate out of bounds
oddaf 84e5e3b
chore: test rates below min bound
oddaf 54dacb4
chore: formatting
oddaf c9dfdfb
Apply suggestions from code review
oddaf 6f00f00
feat: add initial spec [WIP]
amusingaxl abd5b5e
feat: include additional rules and harness
amusingaxl 7bcf215
WIP: checkpoint for rules implementation
amusingaxl 25a3475
fix: mocks and specs to allow rule passing
amusingaxl a808a50
refactor: clean up mocks and spec
amusingaxl 832413a
feat: add remaining rules for edge cases
amusingaxl e78be14
chore: formatting
amusingaxl b156c66
refactor: formatting and cleanup
amusingaxl 57f95dc
feat: add Certora CI action
amusingaxl 4e7a435
Rename module (DSPC -> SPBEAM) (#9)
oddaf 2d04d2e
Rename module (DSPC -> SPBEAM) (#9)
oddaf fcb2478
refactor: rename DSPC to SPBEAM
amusingaxl 4507d0f
fix: remove `MockerBrokenConv` override
amusingaxl ab956ec
Merge branch 'initial-implementation' into feat/certora-spec
amusingaxl e6ff425
refactor: revert mock implementation change
amusingaxl 59a1f48
refactor: improve and cleanup rules
amusingaxl a4b7919
feat(file_per_id): add assertions for keeping other params unchanged
amusingaxl b3b2247
refactor(set): remove require on updates.length
amusingaxl f0f2ea9
refactor(set_revert): apply suggestions from code review
amusingaxl 67d5fbc
feat(invariants): add rules check on invariants for the rates being set
amusingaxl d8523fc
Merge branch 'master' into feat/certora-spec
amusingaxl bf641e6
refactor: improve rules and mocks
amusingaxl d20dd66
feat: add rule to check invariant on `min <= max` for the configs
amusingaxl File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 }} | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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),) | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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" | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.