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

add gas benchmark suite and minor edit to verifier #14

Merged
merged 2 commits into from
Sep 22, 2023
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
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ jobs:

- run: |
forge --version
forge build --via-ir --sizes
forge build --sizes
id: build

- run: |
forge test --via-ir -vv
forge coverage --via-ir --ir-minimum --report lcov
forge test -vv
forge coverage --ir-minimum --report lcov
git diff --exit-code
id: test

Expand All @@ -44,7 +44,7 @@ jobs:
- run: |
cd test-vectors
npm ci
npm start
npm run generate_wycheproof
npm test
git diff --exit-code
id: test
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@
"[solidity]": {
"editor.defaultFormatter": "JuanBlanco.solidity"
},
"coverage-gutters.coverageFileNames": ["lcov.info"]
"coverage-gutters.coverageFileNames": ["lcov.info"],
"solidity.compileUsingRemoteVersion": "v0.8.21+commit.d9974bed"
Copy link
Member

Choose a reason for hiding this comment

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

i recommend installing svm

Copy link
Member Author

Choose a reason for hiding this comment

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

👍 installed!
I think might still be good to pin a version here since CREATE2 addresses depend on compiler versions.

}
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ The secp256r1 elliptic curve, aka P256, is interesting because it's supported by

## Usage

**Address `0xA77aB3533750B0C4b229e441fEe37f13c65A2b1F`**
**Address `0xea923BEe7108728eA2708af25e9981272193a555`**

Available on any chain. If missing, see `deploy.sh`.

Expand All @@ -19,7 +19,7 @@ bytes32 hash; // message hash
uint256 r, s; // signature
uint256 x, y; // public key

address verifier = 0xA77aB3533750B0C4b229e441fEe37f13c65A2b1F;
address verifier = 0xea923BEe7108728eA2708af25e9981272193a555;
bytes memory args = abi.encode(hash, r, s, x, y);
(bool success, bytes memory ret) = verifier.staticcall(args);
assert(success); // never reverts, always returns 0 or 1
Expand Down
24 changes: 12 additions & 12 deletions broadcast/Deploy.s.sol/84531/run-latest.json

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,7 @@ out = "out"
libs = ["lib"]
fs_permissions = [{ access = "read", path = "./"}]
solc = "0.8.21"
optimizer_runs=999999
via_ir=true

# See more config options https://github.com/foundry-rs/foundry/tree/master/config
# See more config options https://book.getfoundry.sh/reference/config/
Loading