Skip to content

algebra: Refactor implementation to be generic over curve choice #151

algebra: Refactor implementation to be generic over curve choice

algebra: Refactor implementation to be generic over curve choice #151

Triggered via push October 9, 2023 22:13
Status Failure
Total duration 2m 0s
Artifacts

test.yml

on: push
Fit to window
Zoom out
Zoom in

Annotations

41 errors
cycle detected when computing the variances for items in this crate: src/lib.rs#L1
error[E0391]: cycle detected when computing the variances for items in this crate | note: ...which requires computing function signature of `algebra::scalar::<impl at src/algebra/scalar.rs:45:1: 45:30>::inner`... --> src/algebra/scalar.rs:60:5 | 60 | pub fn inner(&self) -> Self::Field { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ note: ...which requires computing the variances of `algebra::scalar::Scalar`... --> src/algebra/scalar.rs:43:1 | 43 | pub struct Scalar<C: CurveGroup>(pub(crate) C::ScalarField); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = note: ...which again requires computing the variances for items in this crate, completing the cycle note: cycle used when computing the variances of `algebra::curve::CurvePoint` --> src/algebra/curve.rs:56:1 | 56 | pub struct CurvePoint<C: CurveGroup>(pub(crate) C); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
missing generics for struct `algebra::scalar::Scalar`: src/beaver.rs#L44
error[E0107]: missing generics for struct `algebra::scalar::Scalar` --> src/beaver.rs:44:41 | 44 | ) -> (Vec<Scalar>, Vec<Scalar>, Vec<Scalar>) { | ^^^^^^ expected 1 generic argument | note: struct defined here, with 1 generic parameter: `C` --> src/algebra/scalar.rs:43:12 | 43 | pub struct Scalar<C: CurveGroup>(pub(crate) C::ScalarField); | ^^^^^^ - help: add missing generic argument | 44 | ) -> (Vec<Scalar>, Vec<Scalar>, Vec<Scalar<C>>) { | +++
missing generics for struct `algebra::scalar::Scalar`: src/beaver.rs#L44
error[E0107]: missing generics for struct `algebra::scalar::Scalar` --> src/beaver.rs:44:28 | 44 | ) -> (Vec<Scalar>, Vec<Scalar>, Vec<Scalar>) { | ^^^^^^ expected 1 generic argument | note: struct defined here, with 1 generic parameter: `C` --> src/algebra/scalar.rs:43:12 | 43 | pub struct Scalar<C: CurveGroup>(pub(crate) C::ScalarField); | ^^^^^^ - help: add missing generic argument | 44 | ) -> (Vec<Scalar>, Vec<Scalar<C>>, Vec<Scalar>) { | +++
missing generics for struct `algebra::scalar::Scalar`: src/beaver.rs#L44
error[E0107]: missing generics for struct `algebra::scalar::Scalar` --> src/beaver.rs:44:15 | 44 | ) -> (Vec<Scalar>, Vec<Scalar>, Vec<Scalar>) { | ^^^^^^ expected 1 generic argument | note: struct defined here, with 1 generic parameter: `C` --> src/algebra/scalar.rs:43:12 | 43 | pub struct Scalar<C: CurveGroup>(pub(crate) C::ScalarField); | ^^^^^^ - help: add missing generic argument | 44 | ) -> (Vec<Scalar<C>>, Vec<Scalar>, Vec<Scalar>) { | +++
missing generics for struct `algebra::scalar::Scalar`: src/beaver.rs#L39
error[E0107]: missing generics for struct `algebra::scalar::Scalar` --> src/beaver.rs:39:52 | 39 | fn next_triplet(&mut self) -> (Scalar, Scalar, Scalar); | ^^^^^^ expected 1 generic argument | note: struct defined here, with 1 generic parameter: `C` --> src/algebra/scalar.rs:43:12 | 43 | pub struct Scalar<C: CurveGroup>(pub(crate) C::ScalarField); | ^^^^^^ - help: add missing generic argument | 39 | fn next_triplet(&mut self) -> (Scalar, Scalar, Scalar<C>); | +++
missing generics for struct `algebra::scalar::Scalar`: src/beaver.rs#L39
error[E0107]: missing generics for struct `algebra::scalar::Scalar` --> src/beaver.rs:39:44 | 39 | fn next_triplet(&mut self) -> (Scalar, Scalar, Scalar); | ^^^^^^ expected 1 generic argument | note: struct defined here, with 1 generic parameter: `C` --> src/algebra/scalar.rs:43:12 | 43 | pub struct Scalar<C: CurveGroup>(pub(crate) C::ScalarField); | ^^^^^^ - help: add missing generic argument | 39 | fn next_triplet(&mut self) -> (Scalar, Scalar<C>, Scalar); | +++
missing generics for struct `algebra::scalar::Scalar`: src/beaver.rs#L39
error[E0107]: missing generics for struct `algebra::scalar::Scalar` --> src/beaver.rs:39:36 | 39 | fn next_triplet(&mut self) -> (Scalar, Scalar, Scalar); | ^^^^^^ expected 1 generic argument | note: struct defined here, with 1 generic parameter: `C` --> src/algebra/scalar.rs:43:12 | 43 | pub struct Scalar<C: CurveGroup>(pub(crate) C::ScalarField); | ^^^^^^ - help: add missing generic argument | 39 | fn next_triplet(&mut self) -> (Scalar<C>, Scalar, Scalar); | +++
missing generics for struct `algebra::scalar::Scalar`: src/beaver.rs#L33
error[E0107]: missing generics for struct `algebra::scalar::Scalar` --> src/beaver.rs:33:89 | 33 | fn next_shared_inverse_pair_batch(&mut self, num_pairs: usize) -> (Vec<Scalar>, Vec<Scalar>) { | ^^^^^^ expected 1 generic argument | note: struct defined here, with 1 generic parameter: `C` --> src/algebra/scalar.rs:43:12 | 43 | pub struct Scalar<C: CurveGroup>(pub(crate) C::ScalarField); | ^^^^^^ - help: add missing generic argument | 33 | fn next_shared_inverse_pair_batch(&mut self, num_pairs: usize) -> (Vec<Scalar>, Vec<Scalar<C>>) { | +++
missing generics for struct `algebra::scalar::Scalar`: src/beaver.rs#L33
error[E0107]: missing generics for struct `algebra::scalar::Scalar` --> src/beaver.rs:33:76 | 33 | fn next_shared_inverse_pair_batch(&mut self, num_pairs: usize) -> (Vec<Scalar>, Vec<Scalar>) { | ^^^^^^ expected 1 generic argument | note: struct defined here, with 1 generic parameter: `C` --> src/algebra/scalar.rs:43:12 | 43 | pub struct Scalar<C: CurveGroup>(pub(crate) C::ScalarField); | ^^^^^^ - help: add missing generic argument | 33 | fn next_shared_inverse_pair_batch(&mut self, num_pairs: usize) -> (Vec<Scalar<C>>, Vec<Scalar>) { | +++
missing generics for struct `algebra::scalar::Scalar`: src/beaver.rs#L31
error[E0107]: missing generics for struct `algebra::scalar::Scalar` --> src/beaver.rs:31:56 | 31 | fn next_shared_inverse_pair(&mut self) -> (Scalar, Scalar); | ^^^^^^ expected 1 generic argument | note: struct defined here, with 1 generic parameter: `C` --> src/algebra/scalar.rs:43:12 | 43 | pub struct Scalar<C: CurveGroup>(pub(crate) C::ScalarField); | ^^^^^^ - help: add missing generic argument | 31 | fn next_shared_inverse_pair(&mut self) -> (Scalar, Scalar<C>); | +++
missing generics for struct `algebra::scalar::Scalar`: src/beaver.rs#L31
error[E0107]: missing generics for struct `algebra::scalar::Scalar` --> src/beaver.rs:31:48 | 31 | fn next_shared_inverse_pair(&mut self) -> (Scalar, Scalar); | ^^^^^^ expected 1 generic argument | note: struct defined here, with 1 generic parameter: `C` --> src/algebra/scalar.rs:43:12 | 43 | pub struct Scalar<C: CurveGroup>(pub(crate) C::ScalarField); | ^^^^^^ - help: add missing generic argument | 31 | fn next_shared_inverse_pair(&mut self) -> (Scalar<C>, Scalar); | +++
missing generics for struct `algebra::scalar::Scalar`: src/beaver.rs#L25
error[E0107]: missing generics for struct `algebra::scalar::Scalar` --> src/beaver.rs:25:69 | 25 | fn next_shared_value_batch(&mut self, num_values: usize) -> Vec<Scalar> { | ^^^^^^ expected 1 generic argument | note: struct defined here, with 1 generic parameter: `C` --> src/algebra/scalar.rs:43:12 | 43 | pub struct Scalar<C: CurveGroup>(pub(crate) C::ScalarField); | ^^^^^^ - help: add missing generic argument | 25 | fn next_shared_value_batch(&mut self, num_values: usize) -> Vec<Scalar<C>> { | +++
missing generics for struct `algebra::scalar::Scalar`: src/beaver.rs#L23
error[E0107]: missing generics for struct `algebra::scalar::Scalar` --> src/beaver.rs:23:40 | 23 | fn next_shared_value(&mut self) -> Scalar; | ^^^^^^ expected 1 generic argument | note: struct defined here, with 1 generic parameter: `C` --> src/algebra/scalar.rs:43:12 | 43 | pub struct Scalar<C: CurveGroup>(pub(crate) C::ScalarField); | ^^^^^^ - help: add missing generic argument | 23 | fn next_shared_value(&mut self) -> Scalar<C>; | +++
missing generics for struct `algebra::scalar::Scalar`: src/beaver.rs#L17
error[E0107]: missing generics for struct `algebra::scalar::Scalar` --> src/beaver.rs:17:67 | 17 | fn next_shared_bit_batch(&mut self, num_values: usize) -> Vec<Scalar> { | ^^^^^^ expected 1 generic argument | note: struct defined here, with 1 generic parameter: `C` --> src/algebra/scalar.rs:43:12 | 43 | pub struct Scalar<C: CurveGroup>(pub(crate) C::ScalarField); | ^^^^^^ - help: add missing generic argument | 17 | fn next_shared_bit_batch(&mut self, num_values: usize) -> Vec<Scalar<C>> { | +++
missing generics for struct `algebra::scalar::Scalar`: src/beaver.rs#L15
error[E0107]: missing generics for struct `algebra::scalar::Scalar` --> src/beaver.rs:15:38 | 15 | fn next_shared_bit(&mut self) -> Scalar; | ^^^^^^ expected 1 generic argument | note: struct defined here, with 1 generic parameter: `C` --> src/algebra/scalar.rs:43:12 | 43 | pub struct Scalar<C: CurveGroup>(pub(crate) C::ScalarField); | ^^^^^^ - help: add missing generic argument | 15 | fn next_shared_bit(&mut self) -> Scalar<C>; | +++
struct takes 1 generic argument but 2 generic arguments were supplied: src/algebra/scalar.rs#L152
error[E0107]: struct takes 1 generic argument but 2 generic arguments were supplied --> src/algebra/scalar.rs:152:33 | 152 | pub type BatchScalarResult<C> = ResultHandle<C, Vec<Scalar<C>>>; | ^^^^^^^^^^^^ -------------- help: remove this generic argument | | | expected 1 generic argument | note: struct defined here, with 1 generic parameter: `T` --> src/fabric/result.rs:171:12 | 171 | pub struct ResultHandle<T: From<ResultValue>> { | ^^^^^^^^^^^^ -
struct takes 1 generic argument but 2 generic arguments were supplied: src/algebra/curve.rs#L211
error[E0107]: struct takes 1 generic argument but 2 generic arguments were supplied --> src/algebra/curve.rs:211:37 | 211 | pub type BatchCurvePointResult<C> = ResultHandle<C, Vec<CurvePoint<C>>>; | ^^^^^^^^^^^^ ------------------ help: remove this generic argument | | | expected 1 generic argument | note: struct defined here, with 1 generic parameter: `T` --> src/fabric/result.rs:171:12 | 171 | pub struct ResultHandle<T: From<ResultValue>> { | ^^^^^^^^^^^^ -
missing generics for struct `algebra::scalar::Scalar`: src/network.rs#L48
error[E0107]: missing generics for struct `algebra::scalar::Scalar` --> src/network.rs:48:21 | 48 | ScalarBatch(Vec<Scalar>), | ^^^^^^ expected 1 generic argument | note: struct defined here, with 1 generic parameter: `C` --> src/algebra/scalar.rs:43:12 | 43 | pub struct Scalar<C: CurveGroup>(pub(crate) C::ScalarField); | ^^^^^^ - help: add missing generic argument | 48 | ScalarBatch(Vec<Scalar<C>>), | +++
missing generics for struct `algebra::scalar::Scalar`: src/network.rs#L46
error[E0107]: missing generics for struct `algebra::scalar::Scalar` --> src/network.rs:46:12 | 46 | Scalar(Scalar), | ^^^^^^ expected 1 generic argument | note: struct defined here, with 1 generic parameter: `C` --> src/algebra/scalar.rs:43:12 | 43 | pub struct Scalar<C: CurveGroup>(pub(crate) C::ScalarField); | ^^^^^^ - help: add missing generic argument | 46 | Scalar(Scalar<C>), | +++
missing generics for struct `algebra::mpc_scalar::MpcScalarResult`: src/fabric.rs#L166
error[E0107]: missing generics for struct `algebra::mpc_scalar::MpcScalarResult` --> src/fabric.rs:166:29 | 166 | pub mac_key: Option<Arc<MpcScalarResult>>, | ^^^^^^^^^^^^^^^ expected 1 generic argument | note: struct defined here, with 1 generic parameter: `C` --> src/algebra/mpc_scalar.rs:25:12 | 25 | pub struct MpcScalarResult<C: CurveGroup> { | ^^^^^^^^^^^^^^^ - help: add missing generic argument | 166 | pub mac_key: Option<Arc<MpcScalarResult<C>>>, | +++
missing generics for struct `algebra::scalar::Scalar`: src/fabric/result.rs#L50
error[E0107]: missing generics for struct `algebra::scalar::Scalar` --> src/fabric/result.rs:50:21 | 50 | ScalarBatch(Vec<Scalar>), | ^^^^^^ expected 1 generic argument | note: struct defined here, with 1 generic parameter: `C` --> src/algebra/scalar.rs:43:12 | 43 | pub struct Scalar<C: CurveGroup>(pub(crate) C::ScalarField); | ^^^^^^ - help: add missing generic argument | 50 | ScalarBatch(Vec<Scalar<C>>), | +++
missing generics for struct `algebra::scalar::Scalar`: src/fabric/result.rs#L48
error[E0107]: missing generics for struct `algebra::scalar::Scalar` --> src/fabric/result.rs:48:12 | 48 | Scalar(Scalar), | ^^^^^^ expected 1 generic argument | note: struct defined here, with 1 generic parameter: `C` --> src/algebra/scalar.rs:43:12 | 43 | pub struct Scalar<C: CurveGroup>(pub(crate) C::ScalarField); | ^^^^^^ - help: add missing generic argument | 48 | Scalar(Scalar<C>), | +++
missing generics for type alias `algebra::scalar::ScalarResult`: src/commitment.rs#L106
error[E0107]: missing generics for type alias `algebra::scalar::ScalarResult` --> src/commitment.rs:106:28 | 106 | pub(crate) commitment: ScalarResult, | ^^^^^^^^^^^^ expected 1 generic argument | note: type alias defined here, with 1 generic parameter: `C` --> src/algebra/scalar.rs:150:10 | 150 | pub type ScalarResult<C> = ResultHandle<C, Scalar<C>>; | ^^^^^^^^^^^^ - help: add missing generic argument | 106 | pub(crate) commitment: ScalarResult<C>, | +++
missing generics for struct `algebra::scalar::Scalar`: src/commitment.rs#L104
error[E0107]: missing generics for struct `algebra::scalar::Scalar` --> src/commitment.rs:104:25 | 104 | pub(crate) blinder: Scalar, | ^^^^^^ expected 1 generic argument | note: struct defined here, with 1 generic parameter: `C` --> src/algebra/scalar.rs:43:12 | 43 | pub struct Scalar<C: CurveGroup>(pub(crate) C::ScalarField); | ^^^^^^ - help: add missing generic argument | 104 | pub(crate) blinder: Scalar<C>, | +++
missing generics for struct `algebra::scalar::Scalar`: src/commitment.rs#L78
error[E0107]: missing generics for struct `algebra::scalar::Scalar` --> src/commitment.rs:78:28 | 78 | pub(crate) commitment: Scalar, | ^^^^^^ expected 1 generic argument | note: struct defined here, with 1 generic parameter: `C` --> src/algebra/scalar.rs:43:12 | 43 | pub struct Scalar<C: CurveGroup>(pub(crate) C::ScalarField); | ^^^^^^ - help: add missing generic argument | 78 | pub(crate) commitment: Scalar<C>, | +++
missing generics for struct `algebra::scalar::Scalar`: src/commitment.rs#L76
error[E0107]: missing generics for struct `algebra::scalar::Scalar` --> src/commitment.rs:76:25 | 76 | pub(crate) blinder: Scalar, | ^^^^^^ expected 1 generic argument | note: struct defined here, with 1 generic parameter: `C` --> src/algebra/scalar.rs:43:12 | 43 | pub struct Scalar<C: CurveGroup>(pub(crate) C::ScalarField); | ^^^^^^ - help: add missing generic argument | 76 | pub(crate) blinder: Scalar<C>, | +++
missing generics for struct `algebra::scalar::Scalar`: src/commitment.rs#L42
error[E0107]: missing generics for struct `algebra::scalar::Scalar` --> src/commitment.rs:42:25 | 42 | pub(crate) blinder: Scalar, | ^^^^^^ expected 1 generic argument | note: struct defined here, with 1 generic parameter: `C` --> src/algebra/scalar.rs:43:12 | 43 | pub struct Scalar<C: CurveGroup>(pub(crate) C::ScalarField); | ^^^^^^ - help: add missing generic argument | 42 | pub(crate) blinder: Scalar<C>, | +++
missing generics for type alias `algebra::scalar::ScalarResult`: src/commitment.rs#L40
error[E0107]: missing generics for type alias `algebra::scalar::ScalarResult` --> src/commitment.rs:40:23 | 40 | pub(crate) value: ScalarResult, | ^^^^^^^^^^^^ expected 1 generic argument | note: type alias defined here, with 1 generic parameter: `C` --> src/algebra/scalar.rs:150:10 | 150 | pub type ScalarResult<C> = ResultHandle<C, Scalar<C>>; | ^^^^^^^^^^^^ - help: add missing generic argument | 40 | pub(crate) value: ScalarResult<C>, | +++
missing generics for struct `algebra::scalar::Scalar`: src/commitment.rs#L22
error[E0107]: missing generics for struct `algebra::scalar::Scalar` --> src/commitment.rs:22:25 | 22 | pub(crate) blinder: Scalar, | ^^^^^^ expected 1 generic argument | note: struct defined here, with 1 generic parameter: `C` --> src/algebra/scalar.rs:43:12 | 43 | pub struct Scalar<C: CurveGroup>(pub(crate) C::ScalarField); | ^^^^^^ - help: add missing generic argument | 22 | pub(crate) blinder: Scalar<C>, | +++
missing generics for struct `algebra::scalar::Scalar`: src/commitment.rs#L20
error[E0107]: missing generics for struct `algebra::scalar::Scalar` --> src/commitment.rs:20:23 | 20 | pub(crate) value: Scalar, | ^^^^^^ expected 1 generic argument | note: struct defined here, with 1 generic parameter: `C` --> src/algebra/scalar.rs:43:12 | 43 | pub struct Scalar<C: CurveGroup>(pub(crate) C::ScalarField); | ^^^^^^ - help: add missing generic argument | 20 | pub(crate) value: Scalar<C>, | +++
struct takes 1 generic argument but 2 generic arguments were supplied: src/algebra/scalar.rs#L150
error[E0107]: struct takes 1 generic argument but 2 generic arguments were supplied --> src/algebra/scalar.rs:150:28 | 150 | pub type ScalarResult<C> = ResultHandle<C, Scalar<C>>; | ^^^^^^^^^^^^ --------- help: remove this generic argument | | | expected 1 generic argument | note: struct defined here, with 1 generic parameter: `T` --> src/fabric/result.rs:171:12 | 171 | pub struct ResultHandle<T: From<ResultValue>> { | ^^^^^^^^^^^^ -
struct takes 1 generic argument but 2 generic arguments were supplied: src/algebra/curve.rs#L209
error[E0107]: struct takes 1 generic argument but 2 generic arguments were supplied --> src/algebra/curve.rs:209:32 | 209 | pub type CurvePointResult<C> = ResultHandle<C, CurvePoint<C>>; | ^^^^^^^^^^^^ ------------- help: remove this generic argument | | | expected 1 generic argument | note: struct defined here, with 1 generic parameter: `T` --> src/fabric/result.rs:171:12 | 171 | pub struct ResultHandle<T: From<ResultValue>> { | ^^^^^^^^^^^^ -
unused import: `MontFp`: src/algebra/curve.rs#L18
error: unused import: `MontFp` --> src/algebra/curve.rs:18:22 | 18 | use ark_ff::{BigInt, MontFp, PrimeField, Zero}; | ^^^^^^
unused imports: `CurveConfig`, `Projective`, `SWUConfig`: src/algebra/curve.rs#L11
error: unused imports: `CurveConfig`, `Projective`, `SWUConfig` --> src/algebra/curve.rs:11:27 | 11 | curve_maps::swu::{SWUConfig, SWUMap}, | ^^^^^^^^^ ... 15 | short_weierstrass::{Affine, Projective, SWCurveConfig}, | ^^^^^^^^^^ 16 | CurveConfig, CurveGroup, Group, VariableBaseMSM, | ^^^^^^^^^^^
unused import: `ResultHandle`: src/algebra/authenticated_scalar.rs#L19
error: unused import: `ResultHandle` --> src/algebra/authenticated_scalar.rs:19:5 | 19 | ResultHandle, PARTY0, | ^^^^^^^^^^^^ | = note: `-D unused-imports` implied by `-D warnings`
unresolved import `crate::algebra::stark_curve`: src/network.rs#L19
error[E0432]: unresolved import `crate::algebra::stark_curve` --> src/network.rs:19:31 | 19 | algebra::{scalar::Scalar, stark_curve::StarkPoint}, | ^^^^^^^^^^^ could not find `stark_curve` in `algebra`
unresolved imports `crate::algebra::authenticated_stark_point`, `crate::algebra::mpc_stark_point`, `crate::algebra::stark_curve`: src/fabric.rs#L38
error[E0432]: unresolved imports `crate::algebra::authenticated_stark_point`, `crate::algebra::mpc_stark_point`, `crate::algebra::stark_curve` --> src/fabric.rs:38:9 | 38 | authenticated_stark_point::AuthenticatedStarkPointResult, | ^^^^^^^^^^^^^^^^^^^^^^^^^ could not find `authenticated_stark_point` in `algebra` 39 | mpc_scalar::MpcScalarResult, 40 | mpc_stark_point::MpcStarkPointResult, | ^^^^^^^^^^^^^^^ could not find `mpc_stark_point` in `algebra` 41 | scalar::{BatchScalarResult, Scalar, ScalarResult}, 42 | stark_curve::{BatchStarkPointResult, StarkPoint, StarkPointResult}, | ^^^^^^^^^^^ could not find `stark_curve` in `algebra`
unresolved import `crate::algebra::stark_curve`: src/fabric/result.rs#L16
error[E0432]: unresolved import `crate::algebra::stark_curve` --> src/fabric/result.rs:16:31 | 16 | algebra::{scalar::Scalar, stark_curve::StarkPoint}, | ^^^^^^^^^^^ could not find `stark_curve` in `algebra`
unresolved import `crate::algebra::stark_curve`: src/commitment.rs#L10
error[E0432]: unresolved import `crate::algebra::stark_curve` --> src/commitment.rs:10:9 | 10 | stark_curve::{StarkPoint, StarkPointResult}, | ^^^^^^^^^^^ could not find `stark_curve` in `algebra`
unresolved import `algebra::stark_curve`: src/lib.rs#L16
error[E0432]: unresolved import `algebra::stark_curve` --> src/lib.rs:16:31 | 16 | use algebra::{scalar::Scalar, stark_curve::StarkPoint}; | ^^^^^^^^^^^ could not find `stark_curve` in `algebra`
cargo-test
Process completed with exit code 101.