A practical beginner's tutorial for creating, proving, and verifying zkSNARKs in Ethereum smart contracts using ZoKrates.
zkSNARKs Example is a tutorial project that demonstrates how to implement zero-knowledge proofs on the Ethereum blockchain. It provides a practical guide for developers who want to create, prove, and verify zkSNARKs in smart contracts without needing deep cryptographic knowledge. The project uses the ZoKrates toolbox to simplify the process and includes complete code examples.
Ethereum developers and blockchain engineers who want to add privacy features to their smart contracts using zero-knowledge proofs. It's particularly suitable for beginners who need a practical, hands-on introduction to zkSNARKs implementation.
This tutorial stands out by providing a complete, working example that abstracts away the complex mathematics of zkSNARKs. Unlike theoretical explanations, it offers copy-paste-ready code and a clear workflow that developers can immediately apply to their projects.
zkSNARKS tutorial
Walks through the entire workflow from writing a ZoKrates program to deploying a verifier contract, with specific commands like 'compile' and 'export-verifier' for hands-on learning.
Uses the ZoKrates toolbox to abstract complex zkSNARK mathematics, allowing developers to implement proofs without deep cryptographic knowledge, as emphasized in the 'driver's ed' philosophy.
Provides complete Solidity contracts (e.g., Verifier.sol) and Python web3 scripts for verification, enabling copy-paste implementation and immediate testing.
Explains the process through entities like Charlie (trusted party), Alice (prover), and Bob (observer), clarifying real-world roles and making the concept accessible.
Based on a 2018 version of ZoKrates and Ethereum, with the author noting ZoKrates is a 'WIP' and details may change, risking deprecated methods or unsupported dependencies.
Focuses on a simple summing example and acknowledges challenges in interactive applications (e.g., games being brute-forceable), restricting utility for advanced use cases.
Verification requires state-changing transactions with high gas limits, as noted in the tutorial, making it expensive for frequent use on mainnet Ethereum.
The workflow depends on a trusted third party to generate and destroy toxic waste parameters, introducing centralization and security concerns for decentralized applications.
Collection of comprehensive TypeScript libraries for Interaction with the Ethereum JSON RPC API and utility functions.
This repository serves as a collection of code related to specific Ethereum research questions, primarily authored by Vitalik Buterin. It focuses on practical implementations and explorations rather than being a general repository for academic papers. The repository includes a dedicated `papers` folder containing LaTeX files for various academic publications. ## Key Features - **Research Code** — Implementation code for specific Ethereum research questions and experiments - **Academic Papers** — LaTeX source files for published academic papers in the Ethereum domain - **Vitalik Buterin's Work** — Primary repository for research code written by Ethereum's co-founder - **MIT Licensed** — Open source code available under the permissive MIT license ## Philosophy The repository is maintained as-is without active support, focusing on sharing research implementations and academic paper sources rather than providing production-ready tools or ongoing maintenance.
Casper contract, and related software and tests
Casper CBC is a Python implementation of a class of correct-by-construction (CBC) consensus protocols, which are designed to be provably safe and fault-tolerant from the ground up. It currently includes implementations for Casper the Friendly Ghost (a blockchain consensus protocol) and Casper the Friendly Binary Consensus Protocol, serving as a research and simulation platform for novel consensus mechanisms. ## Key Features - **Correct-by-Construction Design** — Protocols are built with formal verification principles to ensure safety and liveness properties. - **Multiple Protocol Support** — Implements consensus for different data structures including binary, blockchain, integer, order, and sharding. - **Configurable Simulations** — Run simulations with various message-passing modes (rand, rrob, full) and customizable parameters like validator count and rounds. - **Visualization Tools** — Generates graphs and GIFs to visualize consensus protocol execution and validator behavior. - **Extensible Framework** — Provides a foundation for writing new simulations and experimenting with consensus algorithms. ## Philosophy The project emphasizes a formal, research-driven approach to consensus, prioritizing provable correctness and modular design to advance the understanding and development of decentralized agreement protocols.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.