This repository was archived by the owner on Oct 31, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 17
feat!: Implement CommonReferenceString trait #139
Merged
Merged
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
b0da9f9
feat!: Implement CommonReferenceString trait on the backend
phated 5bc60f2
chore!: Remove filesystem access and utilize async fetch with range r…
phated 1da9a01
clippy
phated 9facc9a
implement crs updates
phated 5d18ec3
update based on code review
phated da15fe3
add update test and fix impl
phated aba91eb
remove transcript from flake
phated e9bf293
refactor and TryFrom
phated 25af7d5
clippy
phated 75ff423
why was this http?
phated e1cd874
try a local networking hack
phated f83742a
try to workaround no network with a local static server
phated 4367f91
mac having problems resolving localhost?
phated 6dfa0d8
kill and wait
phated fdde6bb
trying some debugging
phated fda396a
parameterize port and name tests for easier debug output
phated a462fe2
skip the wait?
phated 0f5c572
update acvm
phated 5647a7f
update cspell
phated fdc4b64
chore: bump ACVM commit
TomAFrench 9f320e9
chore: update issue number for multi-transcript downloads
TomAFrench File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -55,6 +55,7 @@ | |
| "envrc", | ||
| "subshell", | ||
| "thiserror", | ||
| "bincode", | ||
| // In Solidity | ||
| // | ||
| "addmod", | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| use acvm::{acir::circuit::Circuit, async_trait, CommonReferenceString}; | ||
|
|
||
| use crate::{composer::Composer, BackendError, Barretenberg}; | ||
|
|
||
| // TODO: Separate impl for JS feature | ||
| #[async_trait] | ||
| impl CommonReferenceString for Barretenberg { | ||
| type Error = BackendError; | ||
|
|
||
| async fn generate_common_reference_string( | ||
| &self, | ||
| circuit: &Circuit, | ||
| ) -> Result<Vec<u8>, Self::Error> { | ||
| let constraint_system = &circuit.try_into()?; | ||
| let common_reference_string = self.get_crs(constraint_system).await?.try_into()?; | ||
| // Separated to have nicer coercion on error types | ||
| Ok(common_reference_string) | ||
| } | ||
|
|
||
| async fn update_common_reference_string( | ||
| &self, | ||
| common_reference_string: Vec<u8>, | ||
| circuit: &Circuit, | ||
| ) -> Result<Vec<u8>, Self::Error> { | ||
| let mut crs = common_reference_string.try_into()?; | ||
| let constraint_system = &circuit.try_into()?; | ||
| let common_reference_string = self | ||
| .update_crs(&mut crs, constraint_system) | ||
| .await? | ||
| .try_into()?; | ||
| // Separated to have nicer coercion on error types | ||
| Ok(common_reference_string) | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,6 @@ | ||
| use crate::Barretenberg; | ||
|
|
||
| mod common_reference_string; | ||
| mod proof_system; | ||
| mod pwg; | ||
| mod smart_contract; | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.