|
2 | 2 | //! |
3 | 3 | //! This module handles circuit constraint extraction for the Mina Rust node. |
4 | 4 | //! Circuit constraints are sourced from the |
5 | | -//! [circuit-blobs](https://github.com/openmina/circuit-blobs) repository, which |
| 5 | +//! [circuit-blobs](https://github.com/o1-labs/circuit-blobs) repository, which |
6 | 6 | //! contains pre-compiled circuit data generated by the OCaml implementation. |
7 | 7 | //! |
8 | 8 | //! ## Overview |
|
45 | 45 | //! |
46 | 46 | //! 1. **Environment Variable**: `MINA_CIRCUIT_BLOBS_BASE_DIR` |
47 | 47 | //! 2. **Cargo Manifest Directory**: Current project directory |
48 | | -//! 3. **Home Directory**: `~/.openmina/circuit-blobs/` |
49 | | -//! 4. **System Directory**: `/usr/local/lib/openmina/circuit-blobs` |
| 48 | +//! 3. **Home Directory**: `~/.mina/circuit-blobs/` |
| 49 | +//! 4. **System Directory**: `/usr/local/lib/mina/circuit-blobs` |
50 | 50 | //! |
51 | 51 | //! ### Remote Fetching |
52 | 52 | //! |
53 | 53 | //! If files are not found locally, the system automatically downloads them from: |
54 | 54 | //! |
55 | 55 | //! ```text |
56 | | -//! https://github.com/openmina/circuit-blobs/releases/download/<filename> |
| 56 | +//! https://github.com/o1-labs/circuit-blobs/releases/download/<filename> |
57 | 57 | //! ``` |
58 | 58 | //! |
59 | 59 | //! Downloaded files are cached locally for future use. |
|
77 | 77 | //! 2. **Local Search**: Searches in these locations (in order): |
78 | 78 | //! - `$MINA_CIRCUIT_BLOBS_BASE_DIR` (if set) |
79 | 79 | //! - Current project directory |
80 | | -//! - `~/.openmina/circuit-blobs/` |
81 | | -//! - `/usr/local/lib/openmina/circuit-blobs` |
| 80 | +//! - `~/.mina/circuit-blobs/` |
| 81 | +//! - `/usr/local/lib/mina/circuit-blobs` |
82 | 82 | //! 3. **Automatic Download**: If files aren't found locally, downloads from GitHub |
83 | | -//! 4. **Local Caching**: Saves downloaded files to `~/.openmina/circuit-blobs/` |
| 83 | +//! 4. **Local Caching**: Saves downloaded files to `~/.mina/circuit-blobs/` |
84 | 84 | //! 5. **Ready to Use**: Circuit data is loaded and ready for proof generation |
85 | 85 | //! |
86 | 86 | //! ### Subsequent Runs |
87 | 87 | //! |
88 | | -//! - Uses cached files from `~/.openmina/circuit-blobs/` |
| 88 | +//! - Uses cached files from `~/.mina/circuit-blobs/` |
89 | 89 | //! - No network requests needed |
90 | 90 | //! - Fast startup times |
91 | 91 | //! |
@@ -117,12 +117,12 @@ use std::path::Path; |
117 | 117 | #[cfg(not(target_family = "wasm"))] |
118 | 118 | pub fn home_base_dir() -> Option<std::path::PathBuf> { |
119 | 119 | let mut path = std::path::PathBuf::from(std::env::var("HOME").ok()?); |
120 | | - path.push(".openmina/circuit-blobs"); |
| 120 | + path.push(".mina/circuit-blobs"); |
121 | 121 | Some(path) |
122 | 122 | } |
123 | 123 |
|
124 | 124 | fn git_release_url(filename: &impl AsRef<Path>) -> String { |
125 | | - const RELEASES_PATH: &str = "https://github.com/openmina/circuit-blobs/releases/download"; |
| 125 | + const RELEASES_PATH: &str = "https://github.com/o1-labs/circuit-blobs/releases/download"; |
126 | 126 | let filename_str = filename.as_ref().to_str().unwrap(); |
127 | 127 |
|
128 | 128 | format!("{RELEASES_PATH}/{filename_str}") |
@@ -152,7 +152,7 @@ pub fn fetch_blocking(filename: &impl AsRef<Path>) -> std::io::Result<Vec<u8>> { |
152 | 152 | .or_else(|| try_base_dir(std::env::var("MINA_CIRCUIT_BLOBS_BASE_DIR").ok()?, filename)) |
153 | 153 | .or_else(|| try_base_dir(env!("CARGO_MANIFEST_DIR").to_string(), filename)) |
154 | 154 | .or_else(|| try_base_dir(home_base_dir.clone()?, filename)) |
155 | | - .or_else(|| try_base_dir("/usr/local/lib/openmina/circuit-blobs", filename)); |
| 155 | + .or_else(|| try_base_dir("/usr/local/lib/mina/circuit-blobs", filename)); |
156 | 156 |
|
157 | 157 | if let Some(path) = found { |
158 | 158 | return std::fs::read(path); |
|
0 commit comments