Skip to content

Commit c359bef

Browse files
committed
submodule: zeth [mimc-selector]
1 parent b1cd383 commit c359bef

6 files changed

Lines changed: 24 additions & 82 deletions

File tree

.github/workflows/dev-docs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
- name: Build grpc
2020
run: |
2121
pushd depends/zeth
22-
if ! [ -d depends/grpc ] ; then scripts/install-grpc /usr v1.31.x ; fi
22+
if ! [ -d depends/grpc ] ; then scripts/install-grpc /usr v1.32.x ; fi
2323
popd
2424
2525
build-documentation:
@@ -39,7 +39,7 @@ jobs:
3939
run: |
4040
sudo apt update -y
4141
pushd depends/zeth
42-
INSTALL_ONLY=1 scripts/install-grpc /usr v1.31.x
42+
INSTALL_ONLY=1 scripts/install-grpc /usr v1.32.x
4343
popd
4444
sudo apt install -y doxygen graphviz
4545
- name: Generate documentation

.github/workflows/onpullrequest.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
- name: Build grpc
2121
run: |
2222
pushd depends/zeth
23-
if ! [ -d depends/grpc ] ; then scripts/install-grpc /usr v1.31.x ; fi
23+
if ! [ -d depends/grpc ] ; then scripts/install-grpc /usr v1.32.x ; fi
2424
popd
2525
2626
build-linux-full-tests:
@@ -55,7 +55,7 @@ jobs:
5555
- name: Install dependencies
5656
run: |
5757
pushd depends/zeth
58-
INSTALL_ONLY=1 scripts/install-grpc /usr v1.31.x
58+
INSTALL_ONLY=1 scripts/install-grpc /usr v1.32.x
5959
popd
6060
- name: Execute
6161
run: CI_FULL_TESTS=1 CI_CONFIG=Release scripts/ci build
@@ -92,7 +92,7 @@ jobs:
9292
- name: Install dependencies
9393
run: |
9494
pushd depends/zeth
95-
INSTALL_ONLY=1 scripts/install-grpc /usr v1.31.x
95+
INSTALL_ONLY=1 scripts/install-grpc /usr v1.32.x
9696
popd
9797
- name: Execute
9898
run: CI_INTEGRATION_TESTS=1 CI_CONFIG=Release scripts/ci build

libzecale/circuits/compression_function_selector.hpp

Lines changed: 0 additions & 57 deletions
This file was deleted.

libzecale/circuits/verification_key_hash_gadget.hpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,10 @@
55
#ifndef __ZECALE_CIRCUITS_VERIFICATION_KEY_HASH_GADGET_HPP__
66
#define __ZECALE_CIRCUITS_VERIFICATION_KEY_HASH_GADGET_HPP__
77

8-
#include "libzecale/circuits/compression_function_selector.hpp"
9-
108
#include <libsnark/gadgetlib1/gadgets/basic_gadgets.hpp>
119
#include <libsnark/gadgetlib1/gadgets/hashes/hash_io.hpp>
1210
#include <libzeth/circuits/mimc/mimc_input_hasher.hpp>
11+
#include <libzeth/circuits/mimc/mimc_selector.hpp>
1312

1413
namespace libzecale
1514
{
@@ -22,7 +21,7 @@ class verification_key_hash_gadget : public libsnark::gadget<libff::Fr<wppT>>
2221
{
2322
public:
2423
using FieldT = libff::Fr<wppT>;
25-
using compFnT = compression_function_gadget<wppT>;
24+
using compFnT = libzeth::mimc_compression_function_gadget<FieldT>;
2625
using scalarHasherT = libzeth::mimc_input_hasher<FieldT, compFnT>;
2726

2827
using nsnark = typename nverifierT::snark;

libzecale/tests/aggregator/aggregator_test.cpp

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -30,29 +30,29 @@ using namespace libzeth;
3030
namespace libzeth
3131
{
3232

33-
// Use mimc7 by default
34-
template<> class tree_hash_selector<libff::mnt4_Fr>
35-
{
36-
public:
37-
using tree_hash = MiMC_mp_gadget<
38-
libff::mnt4_Fr,
39-
MiMC_permutation_gadget<libff::mnt4_Fr, 7, 91>>;
40-
};
41-
template<> class tree_hash_selector<libff::mnt6_Fr>
42-
{
43-
public:
44-
using tree_hash = MiMC_mp_gadget<
45-
libff::mnt6_Fr,
46-
MiMC_permutation_gadget<libff::mnt6_Fr, 7, 91>>;
47-
};
33+
// // Use mimc7 by default
34+
// template<> class tree_hash_selector<libff::mnt4_Fr>
35+
// {
36+
// public:
37+
// using tree_hash = MiMC_mp_gadget<
38+
// libff::mnt4_Fr,
39+
// MiMC_permutation_gadget<libff::mnt4_Fr, 7, 91>>;
40+
// };
41+
// template<> class tree_hash_selector<libff::mnt6_Fr>
42+
// {
43+
// public:
44+
// using tree_hash = MiMC_mp_gadget<
45+
// libff::mnt6_Fr,
46+
// MiMC_permutation_gadget<libff::mnt6_Fr, 7, 91>>;
47+
// };
4848

4949
} // namespace libzeth
5050

5151
// The templates and constants used in the Zeth circuit.
5252
template<typename nppT> using hash = libzeth::BLAKE2s_256<libff::Fr<nppT>>;
5353
template<typename nppT>
5454
using hashTree =
55-
typename libzeth::tree_hash_selector<libff::Fr<nppT>>::tree_hash;
55+
typename libzeth::mimc_compression_function_gadget<libff::Fr<nppT>>;
5656

5757
static const size_t tree_depth = 4;
5858
static const size_t inputs_number = 2;

0 commit comments

Comments
 (0)