A BrainFuck zkVM implementation on CKB, using Halo2.
- Use Halo2(modified version from scroll)
- Use bn254 as pairing
- Use KZG
- Verifier on CKB(RISC-V)
- Implement BrainFuck instructions
- Proof size: ~4K bytes, constant
- Cycles: ~130M, constant
- Verifier parameters: 516 bytes, always fixed
- Verifying key size: ~2K bytes, fixed if the circuit is fixed
The verifier parameters can be hard-coded. A new verifying key is needed only for every new circuit.
Install tool (Do it only once):
make install
Build verifier and prover:
make all
Run script on ckb-debugger:
make run-tx
- ckb_bf_base: shared code between prover and verifier.
- ckb_bf_prover: prover. This is the only crate for
std
only. Run on native machine. - ckb_bf_verifier: verifier. Run on CKB in RISC-V
- ckb_bf_vm: Virtual Machine.
- halo2, halo2_gadgets, halo2_proofs, poseidon: halo2 crates.