Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chore: generalize the REPL field and enable BN256 #1017

Merged
merged 1 commit into from
Jan 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/cli/backend.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ impl std::fmt::Display for Backend {

impl Backend {
fn compatible_fields(&self) -> Vec<LanguageField> {
use LanguageField::{Pallas, Vesta};
use LanguageField::{Pallas, BN256};
match self {
Self::Nova => vec![Pallas, Vesta],
Self::Nova => vec![BN256, Pallas],
}
}

Expand Down
11 changes: 5 additions & 6 deletions src/cli/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ mod zstore;
use anyhow::{bail, Context, Result};
use camino::Utf8PathBuf;
use clap::{Args, Parser, Subcommand};
use halo2curves::bn256;
use pasta_curves::pallas;

use std::{
Expand Down Expand Up @@ -353,10 +354,9 @@ impl ReplCli {
validate_non_zero("rc", rc)?;
backend.validate_field(field)?;
match field {
LanguageField::BN256 => repl!(rc, limit, bn256::Fr, backend.clone()),
LanguageField::Pallas => repl!(rc, limit, pallas::Scalar, backend.clone()),
LanguageField::Vesta => todo!(),
LanguageField::BN256 => todo!(),
LanguageField::Grumpkin => todo!(),
LanguageField::Grumpkin | LanguageField::Vesta => unreachable!(),
}
}
}
Expand Down Expand Up @@ -407,10 +407,9 @@ impl LoadCli {
validate_non_zero("rc", rc)?;
backend.validate_field(field)?;
match field {
LanguageField::BN256 => load!(rc, limit, bn256::Fr, backend.clone()),
LanguageField::Pallas => load!(rc, limit, pallas::Scalar, backend.clone()),
LanguageField::Vesta => todo!(),
LanguageField::BN256 => todo!(),
LanguageField::Grumpkin => todo!(),
LanguageField::Grumpkin | LanguageField::Vesta => unreachable!(),
}
}
}
Expand Down
Loading
Loading