Skip to content

Commit

Permalink
Merge pull request #1210 from Zokrates/rc/0.8.1
Browse files Browse the repository at this point in the history
Release 0.8.1
  • Loading branch information
Schaeff authored Aug 23, 2022
2 parents d0015e2 + a083e74 commit 5744359
Show file tree
Hide file tree
Showing 72 changed files with 2,720 additions and 10,959 deletions.
13 changes: 4 additions & 9 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ jobs:
- run:
name: Build
no_output_timeout: "30m"
command: npm run build:dev && npm pack --dry-run
command: npm ci && npm run build:dev && npm pack --dry-run
- save-sccache-cache
zokrates_js_test:
docker:
Expand All @@ -127,7 +127,7 @@ jobs:
- run:
name: Run tests
no_output_timeout: "30m"
command: npm run test
command: npm ci && npm run test
- save-sccache-cache
cross_build:
parameters:
Expand Down Expand Up @@ -164,11 +164,6 @@ jobs:
name: "Publish artifacts on GitHub"
command: |
go install github.com/github-release/github-release@latest
github-release release \
-s ${GH_TOKEN} \
-u ${CIRCLE_PROJECT_USERNAME} \
-r ${CIRCLE_PROJECT_REPONAME} \
-t ${CIRCLE_TAG} || true
find /tmp/artifacts -type f -name *.tar.gz -exec basename {} \; | xargs -I {} github-release upload \
-s ${GH_TOKEN} \
-u ${CIRCLE_PROJECT_USERNAME} \
Expand Down Expand Up @@ -214,8 +209,8 @@ commands:
install_cross:
steps:
- run:
name: Install rust-embedded/cross
command: cargo install --git https://github.com/rust-embedded/cross
name: Install cross
command: cargo install cross --git https://github.com/cross-rs/cross
tar_artifacts:
parameters:
target:
Expand Down
11 changes: 0 additions & 11 deletions .clang-format

This file was deleted.

12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,18 @@ All notable changes to this project will be documented in this file.
## [Unreleased]
https://github.com/Zokrates/ZoKrates/compare/latest...develop

## [0.8.1] - 2022-08-22

### Release
- https://github.com/Zokrates/ZoKrates/releases/tag/0.8.1 <!-- markdown-link-check-disable-line -->

### Changes
- Error out at compile time if the type of a logged value could not be inferred (#1209, @dark64)
- Add `backend` option in `zokrates-js`, bring back bellman, add a log writer to support printing logs in js (#1199, @dark64)
- Fix padding bug in keccak implementation, add support for keccak-224 and sha3-224 (#1197, @dark64)
- Update syntax highlighters (#1195, @schaeff)
- Avoid validity checks on the deserialization of the proving key to improve proving time (#1192, @dark64)

## [0.8.0] - 2022-07-07

### Release
Expand Down
27 changes: 19 additions & 8 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 1 addition & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@ RUN cd src; ./build_release.sh
FROM ubuntu:20.04
ENV ZOKRATES_HOME=/home/zokrates/.zokrates

RUN apt-get update \
&& apt-get install -y --no-install-recommends libgmp3-dev \
&& useradd -u 1000 -m zokrates
RUN useradd -u 1000 -m zokrates

USER zokrates
WORKDIR /home/zokrates
Expand Down
5 changes: 0 additions & 5 deletions Dockerfile.env
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
FROM ubuntu:20.04
SHELL ["/bin/bash", "-c"]

ARG RUST_VERSION=nightly
ARG DEBIAN_FRONTEND=noninteractive

ENV RUSTUP_HOME=/usr/local/rustup \
Expand All @@ -25,12 +24,8 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
&& rm -rf /var/lib/apt/lists/*

RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --default-toolchain none -y \
&& rustup toolchain install $RUST_VERSION --allow-downgrade --profile minimal --component rustfmt clippy \
&& curl -sL https://deb.nodesource.com/setup_16.x | bash - && apt-get install -y nodejs && npm i -g solc \
&& curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh \
&& curl -sL https://raw.githubusercontent.com/Sarcasm/run-clang-format/master/run-clang-format.py > /opt/run-clang-format.py \
&& chmod +x /opt/run-clang-format.py \
&& ln -s /opt/run-clang-format.py /usr/bin \
&& rustup --version; cargo --version; rustc --version; wasm-pack --version; echo nodejs $(node -v);

RUN cd /opt && curl -LO https://github.com/mozilla/geckodriver/releases/download/v0.28.0/geckodriver-v0.28.0-linux64.tar.gz \
Expand Down
13 changes: 0 additions & 13 deletions scripts/install_libsnark_prerequisites.sh

This file was deleted.

8 changes: 8 additions & 0 deletions scripts/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,14 @@ git tag -f $TAG
git push origin -f latest
git push origin $TAG

# Create a release draft
curl \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: token $GH_TOKEN" \
https://api.github.com/repos/Zokrates/ZoKrates/releases \
-d "{\"tag_name\":\"$TAG\",\"draft\":true}"

# Build zokrates js
docker build -t zokrates_js -f zokrates_js/Dockerfile .

Expand Down
2 changes: 1 addition & 1 deletion zokrates_ark/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "zokrates_ark"
version = "0.1.0"
version = "0.1.1"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
Expand Down
4 changes: 2 additions & 2 deletions zokrates_ark/src/gm17.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ impl<T: Field + ArkFieldExtensions> NonUniversalBackend<T, GM17> for Ark {
let (pk, vk) = ArkGM17::<T::ArkEngine>::circuit_specific_setup(computation, rng).unwrap();

let mut pk_vec: Vec<u8> = Vec::new();
pk.serialize_uncompressed(&mut pk_vec).unwrap();
pk.serialize_unchecked(&mut pk_vec).unwrap();

let vk = VerificationKey {
h: parse_g2::<T>(&vk.h_g2),
Expand Down Expand Up @@ -54,7 +54,7 @@ impl<T: Field + ArkFieldExtensions> Backend<T, GM17> for Ark {
.map(parse_fr::<T>)
.collect::<Vec<_>>();

let pk = ProvingKey::<<T as ArkFieldExtensions>::ArkEngine>::deserialize_uncompressed(
let pk = ProvingKey::<<T as ArkFieldExtensions>::ArkEngine>::deserialize_unchecked(
&mut proving_key.as_slice(),
)
.unwrap();
Expand Down
4 changes: 2 additions & 2 deletions zokrates_ark/src/groth16.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ impl<T: Field + ArkFieldExtensions> Backend<T, G16> for Ark {
.map(parse_fr::<T>)
.collect::<Vec<_>>();

let pk = ProvingKey::<<T as ArkFieldExtensions>::ArkEngine>::deserialize_uncompressed(
let pk = ProvingKey::<<T as ArkFieldExtensions>::ArkEngine>::deserialize_unchecked(
&mut proving_key.as_slice(),
)
.unwrap();
Expand Down Expand Up @@ -97,7 +97,7 @@ impl<T: Field + ArkFieldExtensions> NonUniversalBackend<T, G16> for Ark {
let (pk, vk) = Groth16::<T::ArkEngine>::circuit_specific_setup(computation, rng).unwrap();

let mut pk_vec: Vec<u8> = Vec::new();
pk.serialize_uncompressed(&mut pk_vec).unwrap();
pk.serialize_unchecked(&mut pk_vec).unwrap();

let vk = VerificationKey {
alpha: parse_g1::<T>(&vk.alpha_g1),
Expand Down
4 changes: 2 additions & 2 deletions zokrates_ark/src/marlin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ impl<T: Field + ArkFieldExtensions> UniversalBackend<T, marlin::Marlin> for Ark
})?;

let mut serialized_pk: Vec<u8> = Vec::new();
pk.serialize_uncompressed(&mut serialized_pk).unwrap();
pk.serialize_unchecked(&mut serialized_pk).unwrap();

// Precompute some useful values for solidity contract
let fs_seed = to_bytes![&MarlinInst::<T>::PROTOCOL_NAME, &vk].unwrap();
Expand Down Expand Up @@ -225,7 +225,7 @@ impl<T: Field + ArkFieldExtensions> Backend<T, marlin::Marlin> for Ark {
T::ArkEngine,
DensePolynomial<<<T as ArkFieldExtensions>::ArkEngine as PairingEngine>::Fr>,
>,
>::deserialize_uncompressed(&mut proving_key.as_slice())
>::deserialize_unchecked(&mut proving_key.as_slice())
.unwrap();

let public_inputs = computation.public_inputs_values();
Expand Down
2 changes: 1 addition & 1 deletion zokrates_ast/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "zokrates_ast"
version = "0.1.0"
version = "0.1.1"
edition = "2021"

[features]
Expand Down
Loading

0 comments on commit 5744359

Please sign in to comment.