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: cleanup and address TODOs #1299

Merged
merged 1 commit into from
Jan 26, 2025
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
2 changes: 0 additions & 2 deletions .github/workflows/cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ env:
CARGO_TERM_COLOR: always
OPENVM_FAST_TEST: "1"

# TODO: E2E build, transpile, run, keygen, prove, contract, verify on large machine
jobs:
app-level-cli:
runs-on:
Expand Down Expand Up @@ -68,7 +67,6 @@ jobs:
fi
done

# TODO: CLI build, transpile, run, (keygen), prove, contract, verify
- name: Run app-level CLI commands
working-directory: crates/cli
run: |
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ jobs:
source ci/scripts/utils.sh
install_s5cmd

# TODO: store versioned copy of docs when new v*.*.* tag is pushed
- name: Sync static S3 bucket
env:
S3_BUCKET: ${{ vars.CRATE_DOCS_S3_BUCKET }}
Expand Down
1 change: 0 additions & 1 deletion benchmarks/src/bin/ecrecover.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ fn main() -> Result<()> {
let args = BenchmarkCli::parse();

let elf = args.build_bench_program("ecrecover")?;
// TODO: update sw_macros and read it from elf.
let exe = VmExe::from_elf(
elf,
Transpiler::<BabyBear>::default()
Expand Down
1 change: 0 additions & 1 deletion crates/circuits/mod-builder/src/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,6 @@ impl<F: PrimeField64> TraceSubRowGenerator<F> for FieldExpr {
.map(|x| vec_isize_to_f::<F>(x.limbs().to_vec()))
.collect::<Vec<_>>();

// TODO: avoid all these copies and directly allocate
sub_row.copy_from_slice(
&[
vec![F::ONE],
Expand Down
3 changes: 1 addition & 2 deletions crates/circuits/mod-builder/src/field_variable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ impl FieldVariable {
}
}

// TODO: rethink about how should auto-save work.
// TODO[Lun-Kai]: rethink about how should auto-save work.
// This implementation requires self and other to be mutable, and might actually mutate them.
// This might surprise the caller or introduce hard bug if the caller clone the FieldVariable and then call this.
pub fn add(&mut self, other: &mut FieldVariable) -> FieldVariable {
Expand Down Expand Up @@ -278,7 +278,6 @@ impl FieldVariable {
);
let carry_bits = new_constraint.constraint_carry_bits_with_pq(&prime, limb_bits, num_limbs);
if carry_bits > self.range_checker_bits {
// TODO: should save the "bigger" one first (the one with higher limb_max_abs)
self.save();
}
// Do it again to check if other needs to be saved.
Expand Down
2 changes: 1 addition & 1 deletion crates/circuits/mod-builder/src/symbolic_expr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ impl SymbolicExpr {
SymbolicExpr::IntAdd(lhs, s) => {
let (lhs_max_pos, lhs_max_neg) = lhs.max_abs(prime);
let scalar = BigUint::from_usize(s.unsigned_abs()).unwrap();
// TODO[jpw]: since `s` is a constant, we can likely do better than this bound.
// Optimization opportunity: since `s` is a constant, we can likely do better than this bound.
(lhs_max_pos + &scalar, lhs_max_neg + &scalar)
}
SymbolicExpr::IntMul(lhs, s) => {
Expand Down
1 change: 0 additions & 1 deletion crates/circuits/primitives/src/bigint/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ pub fn big_uint_to_limbs(x: &BigUint, limb_bits: usize) -> Vec<usize> {
}

pub fn big_uint_to_num_limbs(x: &BigUint, limb_bits: usize, num_limbs: usize) -> Vec<usize> {
// TODO: inefficient, should allocate `num_limbs` ahead of time.
let limbs = big_uint_to_limbs(x, limb_bits);
let num_limbs = max(num_limbs, limbs.len());
limbs
Expand Down
2 changes: 0 additions & 2 deletions crates/circuits/primitives/src/is_equal_array/trace.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ impl IsEqualVecAir {
self.generate_trace_row_aux(x, y, &mut is_equal_cols.aux);
}

// TODO: should the input always be u32s? This will make more sense when we have the inverse opt in place
// Assumes that input of IsEqualVecColsMut is filled out
pub fn generate_trace_row_aux<F: Field>(
&self,
Expand All @@ -54,7 +53,6 @@ impl IsEqualVecAir {
transition_index += 1;
}

// TODO: test if initializing a mut vec and editting it is more efficient
let prods: Vec<F> = (0..vec_len - 1)
.map(|i| {
if i < transition_index {
Expand Down
1 change: 0 additions & 1 deletion crates/circuits/primitives/src/is_less_than/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ pub struct IsLessThanChip {
pub pairs: Vec<(u32, u32)>,
}

// Todo: implement Chip<SC> for IsLessThanChip
impl IsLessThanChip {
pub fn new(max_bits: usize, range_checker: Arc<VariableRangeCheckerChip>) -> Self {
let bus = range_checker.bus();
Expand Down
3 changes: 0 additions & 3 deletions crates/circuits/primitives/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,3 @@ pub mod xor;

mod sub_air;
pub use sub_air::*;

// keeping to clean up later:
// pub mod offline_checker;
114 changes: 0 additions & 114 deletions crates/circuits/primitives/src/offline_checker/air.rs

This file was deleted.

20 changes: 0 additions & 20 deletions crates/circuits/primitives/src/offline_checker/bridge.rs

This file was deleted.

155 changes: 0 additions & 155 deletions crates/circuits/primitives/src/offline_checker/columns.rs

This file was deleted.

Loading