Skip to content

Commit

Permalink
fix: update vis settings on help (zkonduit#779)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-camuto authored Apr 22, 2024
1 parent bae2e9e commit ae03b65
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -200,13 +200,13 @@ pub struct RunArgs {
/// Hand-written parser for graph variables, eg. batch_size=1
#[arg(short = 'V', long, value_parser = parse_key_val::<String, usize>, default_value = "batch_size->1", value_delimiter = ',')]
pub variables: Vec<(String, usize)>,
/// Flags whether inputs are public, private, hashed
/// Flags whether inputs are public, private, hashed, fixed, kzgcommit
#[arg(long, default_value = "private")]
pub input_visibility: Visibility,
/// Flags whether outputs are public, private, hashed
/// Flags whether outputs are public, private, fixed, hashed, kzgcommit
#[arg(long, default_value = "public")]
pub output_visibility: Visibility,
/// Flags whether params are public, private, hashed
/// Flags whether params are fixed, private, hashed, kzgcommit
#[arg(long, default_value = "private")]
pub param_visibility: Visibility,
#[arg(long, default_value = "false")]
Expand Down Expand Up @@ -248,6 +248,12 @@ impl Default for RunArgs {
impl RunArgs {
///
pub fn validate(&self) -> Result<(), Box<dyn std::error::Error>> {
if self.param_visibility == Visibility::Public {
return Err(
"params cannot be public instances, you are probably trying to use `fixed` or `kzgcommit`"
.into(),
);
}
if self.scale_rebase_multiplier < 1 {
return Err("scale_rebase_multiplier must be >= 1".into());
}
Expand Down

0 comments on commit ae03b65

Please sign in to comment.