Skip to content

Commit

Permalink
Further reduce parameter downloads to reduce CI flakiness
Browse files Browse the repository at this point in the history
  • Loading branch information
vicsn committed Jan 27, 2025
1 parent 7c4a910 commit a8a8887
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 10 deletions.
6 changes: 3 additions & 3 deletions parameters/src/mainnet/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,13 @@ impl_remote!(Degree22, REMOTE_URL, "resources/", "powers-of-beta-22", "usrs");
impl_remote!(Degree23, REMOTE_URL, "resources/", "powers-of-beta-23", "usrs");
impl_remote!(Degree24, REMOTE_URL, "resources/", "powers-of-beta-24", "usrs");
impl_remote!(Degree25, REMOTE_URL, "resources/", "powers-of-beta-25", "usrs");
impl_remote!(Degree26, REMOTE_URL, "resources/", "powers-of-beta-26", "usrs");
impl_remote!(Degree27, REMOTE_URL, "resources/", "powers-of-beta-27", "usrs");
// TODO (nkls): restore on CI.
// The SRS is only used for proving and we don't currently support provers of
// this size. When a users wants to create a proof, they load the appropriate
// powers for the circuit in `batch_circuit_setup` which calls `max_degree`
// based on the domain size.
// impl_remote!(Degree26, REMOTE_URL, "resources/", "powers-of-beta-26", "usrs");
// impl_remote!(Degree27, REMOTE_URL, "resources/", "powers-of-beta-27", "usrs");
// impl_remote!(Degree28, REMOTE_URL, "resources/", "powers-of-beta-28", "usrs");

// Shifted Degrees
Expand All @@ -66,9 +66,9 @@ impl_remote!(ShiftedDegree22, REMOTE_URL, "resources/", "shifted-powers-of-beta-
impl_remote!(ShiftedDegree23, REMOTE_URL, "resources/", "shifted-powers-of-beta-23", "usrs");
impl_remote!(ShiftedDegree24, REMOTE_URL, "resources/", "shifted-powers-of-beta-24", "usrs");
impl_remote!(ShiftedDegree25, REMOTE_URL, "resources/", "shifted-powers-of-beta-25", "usrs");
impl_remote!(ShiftedDegree26, REMOTE_URL, "resources/", "shifted-powers-of-beta-26", "usrs");
// TODO (nkls): restore on CI.
// See `Degree28` above for context.
// impl_remote!(ShiftedDegree26, REMOTE_URL, "resources/", "shifted-powers-of-beta-26", "usrs");
// impl_remote!(ShiftedDegree27, REMOTE_URL, "resources/", "shifted-powers-of-beta-27", "usrs");

// Powers of Beta Times Gamma * G
Expand Down
19 changes: 12 additions & 7 deletions parameters/src/mainnet/powers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,17 @@ const NUM_POWERS_22: usize = 1 << 22;
const NUM_POWERS_23: usize = 1 << 23;
const NUM_POWERS_24: usize = 1 << 24;
const NUM_POWERS_25: usize = 1 << 25;
const NUM_POWERS_26: usize = 1 << 26;
const NUM_POWERS_27: usize = 1 << 27;
const NUM_POWERS_28: usize = 1 << 28;
// TODO (nkls): restore on CI.
// The SRS is only used for proving and we don't currently support provers of
// this size. When a users wants to create a proof, they load the appropriate
// powers for the circuit in `batch_circuit_setup` which calls `max_degree`
// based on the domain size.
// const NUM_POWERS_26: usize = 1 << 26;
// const NUM_POWERS_27: usize = 1 << 27;
// const NUM_POWERS_28: usize = 1 << 28;

/// The maximum degree supported by the SRS.
const MAX_NUM_POWERS: usize = NUM_POWERS_28;
const MAX_NUM_POWERS: usize = NUM_POWERS_25;

lazy_static::lazy_static! {
static ref POWERS_OF_BETA_G_15: Vec<u8> = Degree15::load_bytes().expect("Failed to load powers of beta in universal SRS");
Expand Down Expand Up @@ -413,9 +418,9 @@ impl<E: PairingEngine> PowersOfBetaG<E> {
NUM_POWERS_23 => Degree23::load_bytes()?,
NUM_POWERS_24 => Degree24::load_bytes()?,
NUM_POWERS_25 => Degree25::load_bytes()?,
NUM_POWERS_26 => Degree26::load_bytes()?,
NUM_POWERS_27 => Degree27::load_bytes()?,
// TODO (nkls): restore on CI.
// NUM_POWERS_26 => Degree26::load_bytes()?,
// NUM_POWERS_27 => Degree27::load_bytes()?,
// NUM_POWERS_28 => Degree28::load_bytes()?,
_ => bail!("Cannot download an invalid degree of '{num_powers}'"),
};
Expand Down Expand Up @@ -492,8 +497,8 @@ impl<E: PairingEngine> PowersOfBetaG<E> {
NUM_POWERS_23 => ShiftedDegree23::load_bytes()?,
NUM_POWERS_24 => ShiftedDegree24::load_bytes()?,
NUM_POWERS_25 => ShiftedDegree25::load_bytes()?,
NUM_POWERS_26 => ShiftedDegree26::load_bytes()?,
// TODO (nkls): restore on CI.
// NUM_POWERS_26 => ShiftedDegree26::load_bytes()?,
// NUM_POWERS_27 => ShiftedDegree27::load_bytes()?,
_ => bail!("Cannot download an invalid degree of '{num_powers}'"),
};
Expand Down

0 comments on commit a8a8887

Please sign in to comment.