# Halo 2 We are *considering* using Halo2 circuits and need to evaluate performance differences. With this, it would be useful to be able to prove proofs in a web environment. This will be compiled into web assembly (wasm) with `wasm-pack`. This will entail the following: - Proving the example functions from halo2-scaffold - Implement Unirep proofs (i.e. epochKey, reputation, etc.) - WASM memory management - Currently limited at 2GB - Producing a minimalistic web client # Entry 1 ![](https://hackmd.io/_uploads/rkXZ5Ptw2.png) ``` plonk: - A0@0 * F1@0 + A1@0 * F2@0 + (A0@0 * A1@0) * F0@0 + (A2@0 * F3@0) * -1 + F4@0 Total gates: 1 Total custom constraint polynomials: 1 Total negations: 0 Total additions: 4 Total multiplications: 6 ``` Instance columns have a white background. Advice columns have a red background. Fixed columns have a blue background. - Implemented an arithmetic circuit representing `a^2 * b^2 + C` with Halo2 - Will go through and write a few more arithmetic circuits that utilizes the lookup table and more advanced features - Will write the Collatz Conjecture and some other math sequences as examples - Then implement halo2-scaffold gadgets (i.e. SHA256, Poseidon) - Beginning to develop the WASM web environment which tentatively will consist of the following: - The Halo2 "spreadsheet" view of the arithmetic circuit - Halo2 Cost modelling - Use data from the following: ``` Circuit { k: 11, max_deg: 4, advice_columns: 3, lookups: 0, permutations: [], column_queries: 7, point_sets: 3, estimator: Estimator, } Proof size: 1440 bytes Verification: at least 81.689ms ``` - Clean up the repo overall - Add some extra proving/verification GUI-type stuff # Notes: - [Zordle](https://github.com/nalinbhardwaj/zordle) is a great reference repo for building `halo2` circuits in a prod environment. - `query_fixed()` uses