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

release 0.3.0 sync #56

Merged
merged 21 commits into from
May 23, 2023
Merged

release 0.3.0 sync #56

merged 21 commits into from
May 23, 2023

Commits on May 18, 2023

  1. Feat: extend halo2 base test coverage (#35)

    * feat: add flex_gate_test.rs and pos add() test
    
    * feat: add pos sub() test
    
    * feat: add pos neg() test
    
    * feat: add pos mul() test
    
    * feat: add pos mul_add() test
    
    * feat: add pos mul_not() test
    
    * feat: add pos assert_bit
    
    * feat: add pos div_unsafe() test
    
    * feat: add pos assert_is_const test
    
    * feat: add pos inner_product() test
    
    * feat: add pos inner_product_left_last() test
    
    * feat: add pos inner_product_with_sums test
    
    * feat: add pos sum_products_with_coeff_and_var test
    
    * feat: add pos and() test
    
    * feat: add pos not() test
    
    * feat: add pos select() test
    
    * feat: add pos or_and() test
    
    * feat: add pos bits_to_indicator() test
    
    * feat: add pos idx_to_indicator() test
    
    * feat: add pos select_by_indicator() test
    
    * feat: add pos select_from_idx() test
    
    * feat: add pos is_zero() test
    
    * feat: add pos is_equal() test
    
    * feat: add pos num_to_bits() test
    
    * feat: add pos lagrange_eval() test
    
    * feat: add pos get_field_element() test
    
    * feat: add pos range_check() tests
    
    * feat: add pos check_less_than() test
    
    * feat: add pos check_less_than_safe() test
    
    * feat: add pos check_big_less_than_safe() test
    
    * feat: add pos is_less_than() test
    
    * feat: add pos is_less_than_safe() test
    
    * feat: add pos is_big_less_than_safe() test
    
    * feat: add pos div_mod() test
    
    * feat: add pos get_last_bit() test
    
    * feat: add pos div_mod_var() test
    
    * fix: pass slices into test functions not arrays
    
    * feat: Add pos property tests for flex_gate
    
    * feat: Add positive property tests for flex_gate
    
    * feat: add pos property tests for range_check.rs
    
    * feat: add neg pranking test for idx_to_indicator
    
    * fix: change div_mod_var test values
    
    * feat(refactor): refactor property tests
    
    * fix: fix neg test, assert_const, assert_bit
    
    * fix: failing prop tests
    
    * feat: expand negative testing is_less_than_failing
    
    * fix: Circuit overflow errors on neg tests
    
    * fix: prop_test_mul_not
    
    * fix: everything but get_last_bit & lagrange
    
    * fix: clippy
    
    * fix: set LOOKUP_BITS in range tests, make range check neg test more
    
    robust
    
    * fix: neg_prop_tests cannot prank inputs
    
    Inputs have many copy constraints; pranking initial input will cause all
    copy constraints to fail
    
    * fix: test_is_big_less_than_safe, 240 bits max
    
    * Didn't want to change current `is_less_than` implementation, which in
      order to optimize lookups for smaller bits, only works when inputs
    have at most `(F::CAPACITY // lookup_bits - 1) * lookup_bits` bits
    
    * fix: inline doc for lagrange_and_eval
    
    * Remove proptest for lagrange_and_eval and leave as todo
    
    * tests: add readme about serial execution
    
    ---------
    
    Co-authored-by: Jonathan Wang <jonathanpwang@users.noreply.github.com>
    PatStiles and jonathanpwang authored May 18, 2023
    Configuration menu
    Copy the full SHA
    a79db0e View commit details
    Browse the repository at this point in the history

Commits on May 19, 2023

  1. fix(ecdsa): allow u1*G == u2*PK case (#36)

    NOTE: current ecdsa requires `r, s` to be given as proper CRT integers
    
    TODO: newtypes to guard this assumption
    jonathanpwang authored May 19, 2023
    Configuration menu
    Copy the full SHA
    086c62c View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    55eebd4 View commit details
    Browse the repository at this point in the history
  3. Guard ScalarField byte representations to always be little-endian (#38

    )
    
    fix: guard `ScalarField` to be little-endian
    jonathanpwang authored May 19, 2023
    Configuration menu
    Copy the full SHA
    0948203 View commit details
    Browse the repository at this point in the history
  4. fix: get_last_bit two errors (#39)

    2 embarassing errors:
    * Witness gen for last bit was wrong (used xor instead of &)
    * `ctx.get` was called after `range_check` so it was getting the wrong
      cell
    jonathanpwang authored May 19, 2023
    Configuration menu
    Copy the full SHA
    e477c34 View commit details
    Browse the repository at this point in the history
  5. Add documentation for all debug_asserts (#40)

    feat: add documentation for all debug_asserts
    jonathanpwang authored May 19, 2023
    Configuration menu
    Copy the full SHA
    7e564c8 View commit details
    Browse the repository at this point in the history
  6. fix: FieldChip::divide renamed divide_unsafe (#41)

    Add `divide` that checks denomintor is nonzero.
    Add documentation in cases where `divide_unsafe` is used.
    jonathanpwang authored May 19, 2023
    Configuration menu
    Copy the full SHA
    34f1e7e View commit details
    Browse the repository at this point in the history

Commits on May 22, 2023

  1. Use new types to validate input assumptions (#43)

    * feat: add new types `ProperUint` and `ProperCrtUint`
    
    To guard around assumptions about big integer representations
    
    * fix: remove unused `FixedAssignedCRTInteger`
    
    * feat: use new types for bigint and field chips
    
    New types now guard for different assumptions on non-native bigint
    arithmetic. Distinguish between:
    - Overflow CRT integers
    - Proper BigUint with native part derived from limbs
    - Field elements where inequality < modulus is checked
    
    Also add type to help guard for inequality check in
    ec_add_unequal_strict
    
    Rust traits did not play so nicely with references, so I had to switch
    many functions to move inputs instead of borrow by reference. However to
    avoid writing `clone` everywhere, we allow conversion `From` reference
    to the new type via cloning.
    
    * feat: use `ProperUint` for `big_less_than`
    
    * feat(ecc): add fns for assign private witness points
    
    that constrain point to lie on curve
    
    * fix: unnecessary lifetimes
    
    * chore: remove clones
    jonathanpwang authored May 22, 2023
    Configuration menu
    Copy the full SHA
    0f037e7 View commit details
    Browse the repository at this point in the history
  2. Better handling of EC point at infinity (#44)

    * feat: allow `msm_par` to return identity point
    
    * feat: handle point at infinity
    
    `multi_scalar_multiply` and `multi_exp_par` now handle point at infinity
    completely
    
    Add docs for `ec_add_unequal, ec_sub_unequal, ec_double_and_add_unequal`
    to specify point at infinity leads to undefined behavior
    jonathanpwang authored May 22, 2023
    Configuration menu
    Copy the full SHA
    07f2eba View commit details
    Browse the repository at this point in the history
  3. feat: use strict ec ops more often (#45)

    * `msm` implementations now always use `ec_{add,sub}_unequal` in strict
    mode for safety
    * Add docs to `scalar_multiply` and a flag to specify when it's safe to
      turn off some strict assumptions
    jonathanpwang authored May 22, 2023
    Configuration menu
    Copy the full SHA
    652f9e3 View commit details
    Browse the repository at this point in the history
  4. feat: add parallelize_in helper function (#46)

    Multi-threading of witness generation is tricky because one has to
    ensure the circuit column assignment order stays deterministic. To
    ensure good developer experience / avoiding pitfalls, we provide a new
    helper function for this.
    
    Co-authored-by: Jonathan Wang <jonathanpwang@users.noreply.github.com>
    jonathanpwang and jonathanpwang authored May 22, 2023
    Configuration menu
    Copy the full SHA
    f978636 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    e5cbf14 View commit details
    Browse the repository at this point in the history
  6. feat: fixed_base::msm_par handles identity point (#48)

    We still require fixed base points to be non-identity, but now handle
    the case when scalars may be zero or the final MSM value is identity
    point.
    jonathanpwang authored May 22, 2023
    Configuration menu
    Copy the full SHA
    28d6220 View commit details
    Browse the repository at this point in the history

Commits on May 23, 2023

  1. Configuration menu
    Copy the full SHA
    2c76cc3 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    0e176f3 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    3fce68c View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    4a24493 View commit details
    Browse the repository at this point in the history
  5. Release 0.3.0 ecdsa tests (#54)

    * More ecdsa tests
    
    * Update mod.rs
    
    * Update tests.rs
    
    * Update ecdsa.rs
    
    * Update ecdsa.rs
    
    * Update ecdsa.rs
    
    * chore: sync with release-0.3.0 and update CI
    
    Co-authored-by: yulliakot <yulliakotel@gmail.com>
    Co-authored-by: yuliakot <93175658+yuliakot@users.noreply.github.com>
    3 people authored May 23, 2023
    Configuration menu
    Copy the full SHA
    53e3ad3 View commit details
    Browse the repository at this point in the history
  6. chore: fix CI

    cannot multi-thread tests involving lookups due to environment variables
    jonathanpwang committed May 23, 2023
    Configuration menu
    Copy the full SHA
    bebfb39 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    3d1210a View commit details
    Browse the repository at this point in the history
  8. fix: git CI for community-edition

    smaller test cases for test 'bench_msm'
    jonathanpwang committed May 23, 2023
    Configuration menu
    Copy the full SHA
    63bd16a View commit details
    Browse the repository at this point in the history