Skip to content
Snippets Groups Projects
  1. Dec 06, 2023
    • STEVAN Antoine's avatar
      run FEC decoding test in a loop (!6) · 233ba866
      STEVAN Antoine authored
      # changelog
      - refactor $k$ and $n$ into variables
      - run the decoding FEC test in a loop from $(k - 1) \rho + 1$ to $k \rho$, where $\rho$ is the curve number of bytes per scalar field element, e.g. $31$ for _BLS-12-381_
      - add a _NOTE_ about having too few bytes and elements, i.e. below $(k - 1) \rho + 1$
      - add a _FIXME_ about having too many bytes and elements, i.e. above $k \rho$
      233ba866
    • STEVAN Antoine's avatar
      refactor errors (!5) · 338d131b
      STEVAN Antoine authored
      # changelog
      - rename `LinalgError` to a more general `KomodoError`
      - move `KomodoError` to `error.rs` module
      - add a `TooFewShard(usize, usize)` variant
      338d131b
    • STEVAN Antoine's avatar
      keep error messages in FEC tests (!4) · 6ee82734
      STEVAN Antoine authored
      follow up to !3
      
      ## description
      in !3, to make Clippy happy, `expect` was replace with `unwrap_or_else`, but that suppresses the message of the underlying error, which is not great...
      
      this MR reverts this part of !3 and allows `clippy::expect_fun_call`.
      6ee82734
    • STEVAN Antoine's avatar
      rewrite FEC tests (!3) · 1f879c79
      STEVAN Antoine authored
      # changelog
      - make the FEC decoding test more generic by accepting bytes and encoding by itself
      - define a large `BYTES` constant that holds _random_ bytes
      - calls the template on a slice of `BYTES`
      1f879c79
    • STEVAN Antoine's avatar
      replace `reed-solomon-erasure` dependency by `linalg` module (!2) · f3d915a4
      STEVAN Antoine authored
      # changelog
      - add a `one_less` argument to `field::merge_elements_into_bytes` to mirror the `one_more` from `field::split_data_into_field_elements`
      - add a `linalg` module which defines
        - a `pub LinalgError` enum
        - a `pub(super) Matrix` structure implement for any `ark_ff::Field`, e.g. `<Bls12_381 as Pairing>::ScalarField`
        - `pub(super) Matrix::vandermonde`
        - `pub(super) Matrix::from_vec_vec`
        - `pub(super) Matrix::invert`
        - `pub(super) Matrix::mul`
        - `pub(super) Matrix::transpose`
        - everything is tested extensively
      - modify `fec.rs` to use `linalg::Matrix` instead of `reed-solomon-erasure` => tests still pass
      - remove the dependency to [`reed-solomon-erasure`](https://github.com/jdetchart/reed-solomon-erasure) completely
      f3d915a4
  2. Dec 05, 2023
  3. Dec 01, 2023
  4. Nov 30, 2023