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

feat(nargo): Consume CommonReferenceString functions & manage caching #1348

Merged
merged 7 commits into from
May 22, 2023

Conversation

phated
Copy link
Contributor

@phated phated commented May 15, 2023

Related issue(s)

Resolves #1302

Description

Summary of changes

This updates Nargo core and CLI to take advantage of the new CommonReferenceString trait on the ACVM backends. This allows Nargo to control the cache of CRS artifacts, leaving backends free of any filesystem operations.

I've also renamed the artifact so we don't try to load an old "transcript00.dat" file that isn't a serialized CRS struct that acvm-backend-barretenberg expects.

Dependency additions / changes

Nargo CLI now has the dependency on Tokio to block on the async function.

Test additions / changes

As with the backend test, we now start a static server during nix flake check to server the CRS instead of fetching from AWS because Nix doesn't allow network access in the sandbox.

Checklist

  • I have tested the changes locally.
  • I have formatted the changes with Prettier and/or cargo fmt with default settings.
  • I have linked this PR to the issue(s) that it resolves.
  • I have reviewed the changes on GitHub, line by line.
  • I have ensured all changes are covered in the description.

Documentation needs

  • This PR requires documentation updates when merged.

Additional context

@phated phated marked this pull request as ready for review May 16, 2023 15:55
@phated phated requested a review from TomAFrench May 17, 2023 15:35
TomAFrench and others added 4 commits May 18, 2023 02:33
* master:
  fix: Fix modulo operator for comptime values (#1361)
  chore: clarify that `verify_signature` takes a hashed message (#1365)
  feat: pass in closure to `Driver` to signal backend opcode support (#1349)
  feat(nargo)!: retire print-acir in favour of flag (#1328)
  chore(ssa): enable cse for assert (#1350)
  chore(ssa refactor): Add basic instruction simplification (#1329)
  chore(noir): Release 0.6.0 (#1279)
Copy link
Member

@TomAFrench TomAFrench left a comment

Choose a reason for hiding this comment

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

Looks good, just a couple nits but neither are blockers.

@phated phated merged commit 140587b into phated/acvm-0.12.0 May 22, 2023
@phated phated deleted the phated/ref-string branch May 22, 2023 15:08
TomAFrench added a commit that referenced this pull request May 23, 2023
* phated/acvm-0.12.0:
  fix compilation issue
  switch to published acvm and backend
  feat(nargo): Consume CommonReferenceString functions & manage caching (#1348)
  fix(stdlib): Workaround for Field comparison error in EdDSA signature verification (#1372)
  feat!: remove concept of noir fallbacks for foreign functions (#1371)
  feat(ssa refactor): mem2reg opt pass (#1363)
  feat(stdlib): EdDSA sig verification (#1313)
TomAFrench added a commit that referenced this pull request May 24, 2023
* chore!: Update to ACVM 0.12.0

* feat: adapted to heterogeneous bb calls

* chore: update cargo tomls

* test: re enabled sort test

* fix: improve variable resolution

* feat: use dummy constructor for bb call

* updates for latest

* feat!: Move WitnessMap type into ACVM to avoid leaking BTreeMap type

* feat(nargo): Consume CommonReferenceString functions & manage caching (#1348)

* switch to published acvm and backend

* fix compilation issue

* chore: Remove usage of `acvm::default_is_opcode_supported` (#1366)

Co-authored-by: Blaine Bublitz <[email protected]>
Co-authored-by: Tom French <[email protected]>

* add issue numbers to TODOs

* chore: deduplicate driver setup logic

* chore: clippy

---------

Co-authored-by: sirasistant <[email protected]>
Co-authored-by: Tom French <[email protected]>
Co-authored-by: Tom French <[email protected]>
Co-authored-by: Maxim Vezenov <[email protected]>
vezenovm added a commit that referenced this pull request Jun 1, 2023
* chore!: Update to ACVM 0.12.0

* feat: adapted to heterogeneous bb calls

* chore: update cargo tomls

* test: re enabled sort test

* fix: improve variable resolution

* feat: use dummy constructor for bb call

* updates for latest

* feat!: Move WitnessMap type into ACVM to avoid leaking BTreeMap type

* feat(nargo): Consume CommonReferenceString functions & manage caching (#1348)

* switch to published acvm and backend

* fix compilation issue

* chore: Remove usage of `acvm::default_is_opcode_supported` (#1366)

Co-authored-by: Blaine Bublitz <[email protected]>
Co-authored-by: Tom French <[email protected]>

* add issue numbers to TODOs

* chore: update to ACVM 0.13.0

* chore: fix broken import

* chore: bump commit

* chore: Update Acvm 0.13.0 branch  (#1465)

have acvm-backend-bberg patch reference new branch with additional crate-type

* Update Cargo.toml

* Update Cargo.toml

* update flake.lock

* feat!: var message size for keccak in stdlib (#1481)

* Var message size for keccak in stdlib

* fix the build:
remove aes blackbox
add domain separator for pedersen

* pedersen with domain separator

* chore: update pedersen test case for domain separator (#1482)

pedersen with domain separator

* chore: add pedersen hash with domain separator in stdlib (#1483)

* pedersen with domain separator

* separator for pedersen

* update to acvm 0.13.0 and new acvm-backend-bberg

* update cargo lock

* update MockBackend in sort test

* update merkle_insert and simple_shield for updated pedersen in bberg

* try ubuntu-large

* remove patch and update to acvm-backend-bberg 0.3.0

* cargo.lock

---------

Co-authored-by: Blaine Bublitz <[email protected]>
Co-authored-by: sirasistant <[email protected]>
Co-authored-by: Maxim Vezenov <[email protected]>
Co-authored-by: kevaundray <[email protected]>
Co-authored-by: guipublic <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants