Skip to content

Commit

Permalink
chore: test ACVM BigInt (#5559)
Browse files Browse the repository at this point in the history
# Description

## Problem\*

Part of #5426

## Summary\*

Tests
- Conversion to/from LE arrays of bytes
- Add/Mul associative/commutative/identity
- Mul has L/R zero
- Distributive property
- Invertibility of Add/Mul
- Injectivity of Add

## Additional Context

Without updating `overflow-checks` defaults, the invalid-modulus only
panics locally while passing in CI.

It results in a 22% increase in user time and 27% increase in wall-clock
time running `cargo test` (in release mode):
- With overflow checks: `708.25s user 38.29s system 842% cpu 1:28.65
total`
- Without overflow checks: `577.09s user 32.65s system 875% cpu 1:09.68
total`

## Documentation\*

Check one:
- [x] No documentation needed.
- [ ] Documentation included in this PR.
- [ ] **[For Experimental Features]** Documentation to be submitted in a
separate PR.

# PR Checklist\*

- [x] I have tested the changes locally.
- [x] I have formatted the changes with [Prettier](https://prettier.io/)
and/or `cargo fmt` on default settings.
  • Loading branch information
michaeljklein authored Aug 26, 2024
1 parent a764c5b commit cfad664
Show file tree
Hide file tree
Showing 2,402 changed files with 10,741 additions and 17 deletions.
8 changes: 8 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,14 @@ rust-embed = "6.6.0"
# See https://ritik-mishra.medium.com/resolving-the-wasm-pack-error-locals-exceed-maximum-ec3a9d96685b
opt-level = 1

# release mode with extra checks, e.g. overflow checks
[profile.release-pedantic]
inherits = "release"
overflow-checks = true

[profile.test]
inherits = "dev"
overflow-checks = true

[profile.size]
inherits = "release"
Expand Down
2 changes: 0 additions & 2 deletions acvm-repo/acvm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ repository.workspace = true
[lints]
workspace = true

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
num-bigint.workspace = true
thiserror.workspace = true
Expand Down
Loading

0 comments on commit cfad664

Please sign in to comment.