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

Commit

Permalink
feat: store transcript in .nargo/backends directory (#91)
Browse files Browse the repository at this point in the history
* feat: store transcript in `.nargo/backends` directory

* chore: update `BACKEND_IDENTIFIER` to match contents of flake.nix

* chore: flatten "ignition" dir

* chore: rename `monomial-transcript00.dat` to `transcript00.dat`
  • Loading branch information
TomAFrench committed Apr 6, 2023
1 parent 9c0f06e commit c6b5023
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion barretenberg_static_lib/src/crs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ fn downloading() {
use tempfile::tempdir;
let dir = tempdir().unwrap();

let file_path = dir.path().to_path_buf().join("monomial-transcript00.dat");
let file_path = dir.path().to_path_buf().join("transcript00.dat");
download_crs(file_path);
}
8 changes: 5 additions & 3 deletions common/src/crs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,17 @@ const G1_START: usize = 28;
const G2_START: usize = 28 + (5_040_001 * 64);
const G2_END: usize = G2_START + 128 - 1;

const TRANSCRIPT_NAME: &str = "monomial-transcript00.dat";
const BACKEND_IDENTIFIER: &str = "acvm-backend-barretenberg";
const TRANSCRIPT_NAME: &str = "transcript00.dat";

fn transcript_location() -> PathBuf {
match env::var("BARRETENBERG_TRANSCRIPT") {
Ok(dir) => PathBuf::from(dir),
Err(_) => dirs::home_dir()
.unwrap()
.join("noir_cache")
.join("ignition")
.join(".nargo")

Check warning on line 16 in common/src/crs.rs

View workflow job for this annotation

GitHub Actions / Spellcheck / Spellcheck

Unknown word (nargo)

Check warning on line 16 in common/src/crs.rs

View workflow job for this annotation

GitHub Actions / Spellcheck / Spellcheck

Unknown word (nargo)
.join("backends")
.join(BACKEND_IDENTIFIER)
.join(TRANSCRIPT_NAME),
}
}
Expand Down

0 comments on commit c6b5023

Please sign in to comment.