Skip to content

Commit ea1b973

Browse files
committed
Merge remote-tracking branch 'origin/master' into feat/galileo-v2
2 parents 131eaa3 + 5c7147f commit ea1b973

File tree

2 files changed

+39
-2
lines changed

2 files changed

+39
-2
lines changed

crates/tools/upload-axiom/src/main.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ use jiff::civil::{DateTime, DateTimeDifference};
1212
use jiff::tz::TimeZone;
1313
use jiff::{Timestamp, Unit, Zoned};
1414
use openvm_sdk::commit::CommitBytes;
15-
use scroll_zkvm_types::axiom::get_config_id;
15+
use scroll_zkvm_types::axiom::{AxiomProgram, get_config_id};
1616
use scroll_zkvm_types::utils::serialize_vk;
1717
use std::collections::HashMap;
1818
use std::fs::File;
@@ -252,7 +252,7 @@ fn main() -> eyre::Result<()> {
252252
"{LOG_PREFIX} {OK} Uploaded project {styled_project} with Program ID: {program_id}"
253253
);
254254

255-
program_ids.insert(vk, program_id);
255+
program_ids.insert(vk, AxiomProgram::new(program_id, config_id));
256256
}
257257

258258
if !cli.no_write_ids {

crates/types/src/axiom.rs

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
use serde::{Deserialize, Serialize};
2+
13
pub mod config {
24
/// Axiom configuration ID for [openvm.toml](../../circuits/chunk-circuit/openvm.toml).
35
/// Should be updated when the openvm.toml changes.
@@ -10,6 +12,41 @@ pub mod config {
1012
pub const BUNDLE: &str = "cfg_01k9b6xjt0va25sy94tztwehs7";
1113
}
1214

15+
#[derive(Debug, Clone, Serialize, Deserialize)]
16+
pub struct AxiomProgram {
17+
program_id: String,
18+
config_id: String,
19+
}
20+
21+
impl AxiomProgram {
22+
pub fn new<P: Into<String>, C: Into<String>>(program_id: P, config_id: C) -> Self {
23+
Self {
24+
program_id: program_id.into(),
25+
config_id: config_id.into(),
26+
}
27+
}
28+
29+
pub fn chunk<S: Into<String>>(program_id: S) -> Self {
30+
Self::new(program_id, config::CHUNK)
31+
}
32+
33+
pub fn batch<S: Into<String>>(program_id: S) -> Self {
34+
Self::new(program_id, config::BATCH)
35+
}
36+
37+
pub fn bundle<S: Into<String>>(program_id: S) -> Self {
38+
Self::new(program_id, config::BUNDLE)
39+
}
40+
41+
pub fn program_id(&self) -> &str {
42+
&self.program_id
43+
}
44+
45+
pub fn config_id(&self) -> &str {
46+
&self.config_id
47+
}
48+
}
49+
1350
/// Get the Axiom configuration ID for the given circuit kind.
1451
///
1552
/// # Panics

0 commit comments

Comments
 (0)