Skip to content
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

Certora Script Update & Minor changes #470

Merged
merged 1 commit into from
Jul 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
13 changes: 6 additions & 7 deletions .github/workflows/certora_4337.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
rule: ['verify4337Module.sh', 'verifyTransactionExecutionMethods.sh', 'verifyValidationData.sh', 'verifySignatureLengthCheck.sh']
rule: ['Safe4337Module', 'TransactionExecutionMethods', 'ValidationDataLastBitOne', 'SignatureLengthCheck']
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Install pnpm
uses: pnpm/action-setup@v3
uses: pnpm/action-setup@v4
with:
version: 9

Expand All @@ -33,7 +33,7 @@ jobs:
with: { python-version: 3.11 }

- name: Install certora cli
run: pip install -Iv certora-cli==7.3.0
run: pip install -r modules/4337/certora/requirements.txt

- name: Install solc
run: |
Expand All @@ -47,8 +47,7 @@ jobs:
- name: Verify rule ${{ matrix.rule }}
working-directory: ./modules/4337
run: |
echo "key length" ${#CERTORAKEY}
chmod +x ./certora/scripts/${{ matrix.rule }}
./certora/scripts/${{ matrix.rule }}
echo "Certora key length" ${#CERTORAKEY}
certoraRun certora/conf/${{ matrix.rule }}.conf --wait_for_results=all
env:
CERTORAKEY: ${{ secrets.CERTORA_KEY }}
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ This repository contains a collection of modules for the [Safe Smart Account](ht
- [4337 Module](./modules/4337)
- [Allowance Module](./modules/allowances)
- [Passkey](./modules/passkey)
- [Recovery Module](./modules/recovery/)

## Examples

Expand Down
6 changes: 4 additions & 2 deletions modules/4337/certora/harnesses/Account.sol
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,10 @@ contract Account is Safe {
}
}

// @notice This is a harness contract for the rule that verfies the validation data
// in case the checkSignature functions reverts.
/*
* @notice This is a harness contract for the rule that verfies the validation data
* in case the checkSignature functions reverts.
*/
contract AlwaysRevertingAccount {
function checkSignatures(bytes32 dataHash, bytes memory data, bytes memory signatures) public view {
revert();
Expand Down
1 change: 1 addition & 0 deletions modules/4337/certora/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
certora-cli==7.3.0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we switch to latest https://pypi.org/project/certora-cli/ ? would be a good thing to do together with updating the scripts

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As mentioned in today's sync, I will create a new issue for the upgrade as this requires some changes to the specs which I want to discuss with Certora first.

12 changes: 0 additions & 12 deletions modules/4337/certora/scripts/verify4337Module.sh

This file was deleted.

12 changes: 0 additions & 12 deletions modules/4337/certora/scripts/verifySignatureLengthCheck.sh

This file was deleted.

This file was deleted.

13 changes: 0 additions & 13 deletions modules/4337/certora/scripts/verifyValidationData.sh

This file was deleted.

Loading