Skip to content
This repository was archived by the owner on Oct 31, 2023. It is now read-only.

feat!: Implement CommonReferenceString trait#139

Merged
TomAFrench merged 21 commits intoacvm-0.12.0from
phated/acvm-ref-string
May 16, 2023
Merged

feat!: Implement CommonReferenceString trait#139
TomAFrench merged 21 commits intoacvm-0.12.0from
phated/acvm-ref-string

Conversation

@phated
Copy link
Copy Markdown
Contributor

@phated phated commented Apr 26, 2023

This is a draft implementation of noir-lang/acvm#231 to see how the API worked out.

Closes #160
Closes #162

witness: WitnessAssignments,
proving_key: &[u8],
) -> Vec<u8> {
let circuit_size = self.get_circuit_size(constraint_system);
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I do like this switch away from having to serialize a circuit to/from bberg for every composer method in order to fetch the circuit size and thus the data from the CRS. For methods such as create proof we have been forced to serialize the entire circuit to bberg to fetch the circuit size, and then once again to perform the main action of the method.

Is there anyway to persist the reference string in the Barretenberg struct once we call get_reference_string?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I didn't like the idea of persisting it on the struct because then you have to do like Option<CRS> and check to see if you have it in each function. The idea behind get_reference_string is that it won't be called by nargo if Nargo already has a cached version that is large enough for the circuit, so we'd have to check/cache it in each function, which seems messy.

Comment thread acvm_backend_barretenberg/src/composer.rs Outdated
Comment thread acvm_backend_barretenberg/src/composer.rs Outdated
@phated phated force-pushed the phated/acvm-ref-string branch from ce3cc59 to 81ad859 Compare May 2, 2023 22:52
@phated phated changed the base branch from master to phated/fallible May 2, 2023 22:53
@phated phated force-pushed the phated/acvm-ref-string branch from f4cc81b to b28b147 Compare May 4, 2023 21:14
@phated phated force-pushed the phated/fallible branch from d27955c to 014e598 Compare May 5, 2023 18:55
@phated phated linked an issue May 5, 2023 that may be closed by this pull request
1 task
@phated phated mentioned this pull request May 5, 2023
1 task
@phated phated force-pushed the phated/fallible branch from f71a57f to 7ed2f17 Compare May 8, 2023 17:47
Base automatically changed from phated/fallible to master May 10, 2023 10:25
@phated phated force-pushed the phated/acvm-ref-string branch from b28b147 to 2cc62fd Compare May 11, 2023 00:06
@phated phated changed the base branch from master to acvm-0.12.0 May 11, 2023 00:06
@phated phated changed the title feat!: Implement ReferenceString trait on the backend feat!: Implement CommonReferenceString trait May 11, 2023
Comment thread src/crs.rs Outdated
@phated phated force-pushed the phated/acvm-ref-string branch from 0bdd53b to 84587ff Compare May 11, 2023 20:09
@phated
Copy link
Copy Markdown
Contributor Author

phated commented May 11, 2023

I'm see a lot of DNS failures on Linux. Do we know why or any way to avoid them? Is there a misconfiguration on the AWS bucket where the CRS lives? Or is it a problem with the Reqwest library (searching the internet for the error shows many similar errors from Reqwest...)?

We wouldn't have seen these errors with the old implementation because we were caching in CI and then we were using Nix to fetch.

@phated phated force-pushed the phated/acvm-ref-string branch from 67acf2c to 737d042 Compare May 11, 2023 21:16
@phated phated marked this pull request as ready for review May 12, 2023 15:36
Comment thread cspell.json Outdated
Comment thread flake.nix
@phated phated requested a review from kobyhallx May 12, 2023 23:33
Comment thread src/composer.rs
@phated phated linked an issue May 15, 2023 that may be closed by this pull request
1 task
@phated phated force-pushed the phated/acvm-ref-string branch from 7d27ea0 to 5647a7f Compare May 15, 2023 20:44
@TomAFrench TomAFrench merged commit 04c9d0f into acvm-0.12.0 May 16, 2023
@TomAFrench TomAFrench deleted the phated/acvm-ref-string branch May 16, 2023 05:03
TomAFrench added a commit that referenced this pull request May 19, 2023
* feat!: update to target acvm-84b5d18d

* chore: update to use new black box solver interface

* use patch syntax

* update to latest changes

* feat!: update to acvm with non-homogeneous bb calls (#169)

* feat: update acvm

* feat!: updated acvm to latest master

* chore: update cargo toml

* Update src/barretenberg_structures.rs

Co-authored-by: Tom French <15848336+TomAFrench@users.noreply.github.com>

---------

Co-authored-by: Tom French <15848336+TomAFrench@users.noreply.github.com>

* fix bad rebase

* feat!: Update backend to rely on WitnessMap (#152)

Co-authored-by: Tom French <tom@tomfren.ch>

* update acvm

* feat!: Implement CommonReferenceString trait (#139)

* chore!: Remove filesystem access and utilize async fetch with range requests

Co-authored-by: Tom French <tom@tomfren.ch>

* chore: Switch to tokio test macro for async function (#191)

* chore: Remove `sled` & `tempfile` dev-dependencies (#190)

* chore: Remove sled & tempfile dev-dependencies

* chore: space out functions

---------

Co-authored-by: Tom French <tom@tomfren.ch>

* chore: bump to crates.io release

* Update src/crs.rs

* chore: Remove streaming CRS download & indicator (#194)

* Update src/acvm_interop/common_reference_string.rs

* code review

---------

Co-authored-by: Blaine Bublitz <blaine.bublitz@gmail.com>
Co-authored-by: Álvaro Rodríguez <sirasistant@gmail.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CRS should fetch only what is needed Remove filesystem operations from the backend

4 participants