diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000000000000000000000000000000000000..a302ba2abe900f29b44525360d49a8105e78000a --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,36 @@ +image: "rust:latest" + +workflow: + rules: + - if: $CI_COMMIT_MESSAGE =~ /^(draft|no-ci):/ + when: never + - if: $CI_PIPELINE_SOURCE == "merge_request_event" + - if: $CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS + when: never + - if: ($CI_PIPELINE_SOURCE == "push") && ($CI_COMMIT_BRANCH == "master") + +format: + script: + - rustup component add rustfmt + - cargo fmt --all --check + +test_stable: + script: + - cargo check --examples --all + - cargo check --examples --all-features --all + - cargo test --release + +test_nightly: + script: + - rustup install nightly + - cargo +nightly check --examples --all + - cargo +nightly check --all-features --examples --all --benches + - cargo +nightly test --release + +check_no_std: + script: + - cargo check --examples --no-default-features --target aarch64-unknown-none + +# build_no_std: +# script: +# - cargo build --no-default-features --target aarch64-unknown-none diff --git a/src/kzg10/mod.rs b/src/kzg10/mod.rs index d1e35d34e666911dbd101db49b9aba8503251c27..8853cc3d7bb481797326d74de7a8c996a732b865 100644 --- a/src/kzg10/mod.rs +++ b/src/kzg10/mod.rs @@ -260,6 +260,7 @@ where Ok((witness_polynomial, random_witness_polynomial)) } + /// TODO: missing documentation pub fn open_with_witness_polynomial<'a>( powers: &Powers<E>, point: P::Point, @@ -410,6 +411,7 @@ where Ok(result) } + /// TODO: missing documentation pub fn check_degree_is_too_large(degree: usize, num_powers: usize) -> Result<(), Error> { let num_coefficients = degree + 1; if num_coefficients > num_powers { @@ -422,10 +424,8 @@ where } } - pub fn check_hiding_bound( - hiding_poly_degree: usize, - num_powers: usize, - ) -> Result<(), Error> { + /// TODO: missing documentation + pub fn check_hiding_bound(hiding_poly_degree: usize, num_powers: usize) -> Result<(), Error> { if hiding_poly_degree == 0 { Err(Error::HidingBoundIsZero) } else if hiding_poly_degree >= num_powers { @@ -441,6 +441,7 @@ where } } + /// TODO: missing documentation pub fn check_degrees_and_bounds<'a>( supported_degree: usize, max_degree: usize,