Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 26 additions & 3 deletions docs/issue-44.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,28 @@
# Issue 44
# Issue 44: Implement Real Groth16 Battle Circuit Constraints

Work in progress by Emulated Coder.
## Summary

Ref: #44
This issue tracks the implementation of the Groth16 battle circuit constraints for the Bitcell ZKP project. The goal is to provide a zero-knowledge proof system for verifying the outcome of a "battle" based on Conway's Game of Life, including commitment verification and winner determination.

## Implementation Plan

- Design and implement an R1CS (Rank-1 Constraint System) circuit that simulates the Game of Life for a given number of steps.
- Verify player commitments to their initial states.
- Determine the winner based on the final state after simulation.
- Integrate the circuit with the Groth16 proving system.

## Status

The full implementation of the Groth16 battle circuit constraints is already present in [`crates/bitcell-zkp/src/battle_constraints.rs`](../crates/bitcell-zkp/src/battle_constraints.rs). This file contains:

- A complete R1CS constraint system for the battle circuit.
- Logic for simulating Conway's Game of Life.
- Commitment verification for player inputs.
- Winner determination logic.

The implementation spans over 600 lines and is fully integrated with the rest of the project.

## References

- [Issue #44](https://github.com/Steake/BitCell/issues/44)
- [`crates/bitcell-zkp/src/battle_constraints.rs`](../crates/bitcell-zkp/src/battle_constraints.rs)