{"id":33221071,"url":"https://github.com/clearmatics/zeth","last_synced_at":"2026-01-23T02:54:16.129Z","repository":{"id":34810718,"uuid":"178205666","full_name":"clearmatics/zeth","owner":"clearmatics","description":"Integration of Zerocash on Ethereum: https://arxiv.org/abs/1904.00905","archived":false,"fork":false,"pushed_at":"2023-08-01T23:32:02.000Z","size":23202,"stargazers_count":57,"open_issues_count":54,"forks_count":27,"subscribers_count":16,"default_branch":"master","last_synced_at":"2025-06-10T11:11:37.062Z","etag":null,"topics":["clearmatics-research","ethereum","mixer","privacy","research-and-development","zero-knowledge-proofs","zerocash","zeth","zk-snarks"],"latest_commit_sha":null,"homepage":"https://clearmatics.github.io/zeth/","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/clearmatics.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null}},"created_at":"2019-03-28T13:07:54.000Z","updated_at":"2024-08-21T12:01:57.000Z","dependencies_parsed_at":"2023-01-15T09:18:38.674Z","dependency_job_id":null,"html_url":"https://github.com/clearmatics/zeth","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/clearmatics/zeth","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clearmatics%2Fzeth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clearmatics%2Fzeth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clearmatics%2Fzeth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clearmatics%2Fzeth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/clearmatics","download_url":"https://codeload.github.com/clearmatics/zeth/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clearmatics%2Fzeth/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28679139,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-23T01:00:35.747Z","status":"online","status_checked_at":"2026-01-23T02:00:08.296Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["clearmatics-research","ethereum","mixer","privacy","research-and-development","zero-knowledge-proofs","zerocash","zeth","zk-snarks"],"created_at":"2025-11-16T15:00:30.671Z","updated_at":"2026-01-23T02:54:16.117Z","avatar_url":"https://github.com/clearmatics.png","language":"C++","readme":"# Zeth - Zerocash on Ethereum\n\n![macOS build](https://github.com/clearmatics/zeth/workflows/zeth-ci-push-build-macos/badge.svg)\n![ubuntu build](https://github.com/clearmatics/zeth/workflows/zeth-ci-push-build-ubuntu/badge.svg)\n\n**WARNING** This project is a Proof of Concept. It is highly inefficient and has not been thoroughly reviewed. Please do not use in production!\n\n**Disclaimer:** This work is inspired from [babyzoe](https://github.com/zcash-hackworks/babyzoe), [Miximus](https://github.com/barryWhiteHat/miximus.git). It follows and extends the design presented in [zerocash-ethereum](https://github.com/AntoineRondelet/zerocash-ethereum) by adapting some code initially written by [Zcash](https://github.com/zcash/zcash).\n\nIt is not intended for handling real value or for use on public networks. The authors have not created any such deployment, and assume no responsibility for any fork of the code or deployment created by other parties.\n\nCheck our [paper](https://arxiv.org/pdf/1904.00905.pdf), and the [protocol specifications](https://github.com/clearmatics/zeth-specifications) for more information about Zeth.\n\nCollaboration is welcome.  Consider opening an issue or a pull-request targeting this repository, or writing a [Zeth Protocol Improvement Proposal (ZPIP)](https://github.com/clearmatics/zpips).\n\n## Building and running the project:\n\n**Warning** This project primarily targets x86_64 Linux and macOS platforms.\n\n### Environment\n\nIn order to follow the README below, you will need:\n- [Docker](https://www.docker.com/get-started)\n- [Npm](https://www.npmjs.com/get-npm) (at least version `6.9.0`)\n- [Node](https://nodejs.org/en/) (recommended version `v10` to be able to build and use the custom `ganache-cli`)\n- [Python3](https://www.python.org/downloads/) (at least version `3.7`)\n- [Pip](https://pip.pypa.io/en/stable/) (at least version `19.0.2`)\n\nAdditionally, several tools from the GCC and LLVM tools suite are used to improve code quality and generate the documentation of the project. These are required in order to compile the project with all options enabled:\n- [Doxygen](http://www.doxygen.nl/)\n- [clang-format](https://clang.llvm.org/docs/ClangFormat.html)\n- [clang-tidy](https://clang.llvm.org/extra/clang-tidy/)\n- [cppcheck](http://cppcheck.sourceforge.net/)\n- [include-what-you-use](https://include-what-you-use.org/)\n- [llvm-symbolizer](https://llvm.org/docs/CommandGuide/llvm-symbolizer.html)\n\nTo use the Zeth functionality, 3 components are required:\n- An Ethereum network (the commands below use a local testnet) to host the Zeth\n  contracts and handle transactions.\n- A running `prover-server` process, used by Zeth clients to generate proofs.\n- Client tools, which generate all inputs required for a Zeth operations,\n  request proofs from the `prover-server`, and transmit transactions to the\n  Ethereum network holding the Zeth contract.\n\nWe use 3 terminals, one for each of the above components.\n\nNote: Mac users should increase docker runtime memory from 2GB to 4GB to allow Terminal 1 to complete successfully.\n\n#### Terminal 1:\n\nWe propose 2 alternatives to run the `prover-server` below.\n\n##### Fetch the `prover-server` image (recommended)\n\n```bash\ndocker pull ghcr.io/clearmatics/zeth:latest-prover\ndocker run -ti -p 50051:50051 --name prover ghcr.io/clearmatics/zeth:latest-prover prover-server\n```\n\n##### Build and run the `prover-server` in the development container\n\n```bash\n# Clone this repository:\ngit clone git@github.com:clearmatics/zeth.git\ncd zeth\n\n# Build the zeth-dev image\ndocker build -f Dockerfile-dev -t zeth-dev .\n# Start the zeth development container\ndocker run -ti -p 50051:50051 --name zeth zeth-dev:latest\n\n# All the commands below are run in the docker container\n# Configure your environment\n. ./setup_env.sh\n\n# Compile the proving server\nmkdir build\ncd build\ncmake .. [\u003cflags (see below)\u003e]\n# Compile all libraries and tools, including the prover-server\nmake\n# (optional) Run the unit tests\nmake test\n# (optional) Run the all tests (unit tests, syntax checks, etc)\nmake check\n\n# Start the prover-server process\nprover-server\n```\n\nNote: By default, `prover-server` generates a key at startup. Flags can be used\nto force the server to load and/or save keys. Run `prover-server --help`\nfor more details.\n\n##### Build Options\n\nSome flags to the `cmake` command can control the build configuration.\n`-DCMAKE_BUILD_TYPE=Release` or `-DCMAKE_BUILD_TYPE=Debug` can be used to force\na release or debug build.\n\nBy default, zeth makes use of the GROTH16 zk-snark. To chose a different\nzksnark run the following: ``` cmake -DZETH_SNARK=$ZKSNARK .. ``` where\n`$ZETH_SNARK` is `PGHR13` (see https://eprint.iacr.org/2013/279,\nhttp://eprint.iacr.org/2013/879) or `GROTH16`(see\nhttps://eprint.iacr.org/2016/260).\n\n#### Terminal 2: Ethereum testnet\n\n```bash\nscripts/ganache-start\n```\n\n#### Terminal 3: Python client\n\n```bash\n# Configure your environment\n. ./setup_env.sh\n\ncd client\n```\n\nFollow the steps described in the [client README](client/README.md) to run\ntests or invoke the zeth tools.\n\n## Secure Multi Party Computation for the Groth16 SRS generation\n\nSee [MPC for SRS generation documentation](mpc/README.md)\n\n## Development dependencies (for building outside of the Docker container)\n\nImmediate dependencies are provided as submodules and compiled during\nthe Zeth build. Ensure submodules are synced.\n\nThe following libraries are also required to build:\n\n- grpc\n- gmp\n- boost\n- openssl\n\n## Generate the Doxygen documentation\n\nTo generate the documentation of Zeth:\n```bash\ncd build\ncmake .. -DGEN_DOC=ON \u0026\u0026 make docs\n```\n\n## Compile the project using 'sanitizers'\n\nYou can select the sanitizer of your choice (one of the sanitizers listed [here](./cmake/sanitizers.cmake)) by passing the flag `-DSANITIZER=\u003csanitizer\u003e` to `cmake`.\n\nExample:\n```bash\ncd build\ncmake -DCMAKE_C_COMPILER=/usr/bin/clang -DCMAKE_CXX_COMPILER=/usr/bin/clang++ -DSANITIZER=Address -DCMAKE_BUILD_TYPE=Debug ..\nmake check\n```\n\n## Docker images\n| Docker files | Image | Tags | Description |\n|---------------|------|-----|--|\n| [./Dockerfile-prover](./Dockerfile-prover) | [ghcr.io/clearmatics/zeth:latest-prover](https://github.com/orgs/clearmatics/packages/container/package/zeth) | `latest-prover`, `X.Y.Z-prover` - Release of zeth, `git-%HASH%-prover` - developers build by git-commit  | [Zeth Prover Server](./prover_server/README.md). Image use `zeth-base` for building |\n| [./Dockerfile-client](./Dockerfile-client) | [ghcr.io/clearmatics/zeth:latest-client](https://github.com/orgs/clearmatics/packages/container/package/zeth) | `latest-client`, `X.Y.Z-client` - Release of zeth, `git-%HASH%-client` - developers build by git-commit  | [Python client to interact with the prover](./client/README.md) |\n| [./Dockerfile-mpc](./Dockerfile-mpc) | [ghcr.io/clearmatics/zeth:latest-mpc](https://github.com/orgs/clearmatics/packages/container/package/zeth) | `latest-mpc`, `X.Y.Z-mpc` - Release of zeth, `git-%HASH%-mpc` - developers build by git-commit  | [Tools for Multi-Party Computation](./mpc/README.md). Image use `zeth-base` for building |\n| [./Dockerfile-base](./Dockerfile-base) | [ghcr.io/clearmatics/zeth:latest-base](https://github.com/orgs/clearmatics/packages/container/package/zeth) | `latest-base`, `A.B.C-base` - Release of zeth-base | Base image for building other containers |\n\n\n## Run analysis tools on the code\n\nSeveral tools can be ran on the code. These can be enabled via a set of compilation options.\n\nNote: The `clang-tidy` target runs a clang-tidy python script that should be fetched from [here](https://github.com/llvm/llvm-project/blob/master/clang-tools-extra/clang-tidy/tool/run-clang-tidy.py). To do so, run: `cd build \u0026\u0026 wget https://raw.githubusercontent.com/llvm/llvm-project/master/clang-tools-extra/clang-tidy/tool/run-clang-tidy.py`\n\nExample:\n```bash\n# run-clang-tidy.py needs to be in the PATH to be found\nPATH=$PATH:${PWD}\nchmod +x run-clang-tidy.py\n\ncmake -DUSE_CLANG_FORMAT=ON -DUSE_CPP_CHECK=ON -DUSE_CLANG_TIDY=ON ..\nmake cppcheck\nmake clang-format\nmake clang-tidy\n```\n\n## Generate code coverage report\n\n1. Make sure to enable the `CODE_COVERAGE` option in the CMake configuration.\n2. Compile the tests\n```bash\ncd build \u0026\u0026 cmake -DCODE_COVERAGE=ON -DCMAKE_BUILD_TYPE=Debug .. \u0026\u0026 make check\n```\n3. Generate the coverage report:\n```bash\nmake coverage\n```\n\n**Note:** In order to generate the coverage reports, you will need `lcov`, along with `genhtml` and `xdg-open`.\n\n## References and useful links\n\n- **BabyZoe:** https://github.com/zcash-hackworks/babyzoe\n- **Miximus:** https://github.com/barryWhiteHat/miximus.git\n- **SCIPR LAB github:** https://github.com/scipr-lab/\n- **Zcash github:** https://github.com/zcash/zcash\n- **ZeroCash:** http://zerocash-project.org/\n- **Zerocash-Ethereum:** https://github.com/AntoineRondelet/zerocash-ethereum\n\n## License notices:\n\n### Zcash\n\n```\nCopyright (c) 2016-2018 The Zcash developers\nCopyright (c) 2009-2018 The Bitcoin Core developers\nCopyright (c) 2009-2018 Bitcoin Developers\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n\n\nThe MIT software license (http://www.opensource.org/licenses/mit-license.php)\nabove applies to the code directly included in this source distribution.\nDependencies downloaded as part of the build process may be covered by other\nopen-source licenses. For further details see 'contrib/debian/copyright'.\n\n\nThis product includes software developed by the OpenSSL Project for use in the\nOpenSSL Toolkit (https://www.openssl.org/). This product includes cryptographic\nsoftware written by Eric Young (eay@cryptsoft.com).\n\n\nAlthough almost all of the Zcash code is licensed under \"permissive\" open source\nlicenses, users and distributors should note that when built using the default\nbuild options, Zcash depends on Oracle Berkeley DB 6.2.x, which is licensed\nunder the GNU Affero General Public License.\n```\n\n### Libsnark\n\n```\nThe libsnark library is developed by SCIPR Lab (http://scipr-lab.org)\nand contributors.\n\nCopyright (c) 2012-2014 SCIPR Lab and contributors (see AUTHORS file).\n\nAll files, with the exceptions below, are released under the MIT License:\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n```\n\n### Miximus\n\n[barryWhiteHat/miximus GNU General Public License v3.0](https://github.com/barryWhiteHat/miximus/blob/master/LICENSE)\n","funding_links":[],"categories":["Projects"],"sub_categories":["Zk-Applications"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclearmatics%2Fzeth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fclearmatics%2Fzeth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclearmatics%2Fzeth/lists"}