Skip to content

Commit 4cdf44c

Browse files
committed
refactor: add ethproofs api key
1 parent 3fda13f commit 4cdf44c

File tree

5 files changed

+17
-5
lines changed

5 files changed

+17
-5
lines changed

zkvm_execution_layer/src/ethproofs_demo.rs

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,14 @@ pub async fn fetch_proof_from_ethproofs(
8787
));
8888
}
8989

90-
let response = client
91-
.get(&url)
90+
let mut request = client.get(&url);
91+
92+
// Add API key header if environment variable is set
93+
if let Ok(api_key) = std::env::var("ETHPROOFS_API_KEY") {
94+
request = request.header("Authorization", format!("Bearer {}", api_key));
95+
}
96+
97+
let response = request
9298
.send()
9399
.await
94100
.map_err(|e| format!("Request failed: {}", e))?;
@@ -133,8 +139,14 @@ pub async fn download_proof_binary(proof_id: u64) -> Result<Vec<u8>, String> {
133139

134140
info!(proof_id, "[Ethproofs] Downloading proof binary");
135141

136-
let response = client
137-
.get(&url)
142+
let mut request = client.get(&url);
143+
144+
// Add API key header if environment variable is set
145+
if let Ok(api_key) = std::env::var("ETHPROOFS_API_KEY") {
146+
request = request.header("Authorization", format!("Bearer {}", api_key));
147+
}
148+
149+
let response = request
138150
.send()
139151
.await
140152
.map_err(|e| format!("Request failed: {}", e))?;
Binary file not shown.
Binary file not shown.

zkvm_execution_layer/src/verifiers/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ pub mod ethproofs_ids {
3838
pub const FALLBACK_UUID: &str = "00000000-0000-0000-0000-000000000000";
3939

4040
/// OpenVM verifier UUID (proof_id = 2)
41-
pub const OPENVM_UUID: &str = "425971e7-78eb-4d61-95d9-e9eea62f41da";
41+
pub const OPENVM_UUID: &str = "9b6768c0-831d-488c-ba72-05f93975a3be";
4242

4343
/// Pico Prism verifier UUID (proof_id = 3)
4444
pub const PICO_UUID: &str = "f404c187-88d6-4927-963c-61760a639900";

0 commit comments

Comments
 (0)