# Clone the repository
git clone https://github.com/zacksfF/go-bn128.git
cd go-bn128
# Initialize module
go mod download
go mod tidy# Run quick validation
make quick# Run all tests with coverage
make testTest coverage: 91%
# View coverage report
make coverage# Run all benchmarks
make benchPerformance on modern hardware:
- G1 scalar multiplication: ~3ms
- G2 scalar multiplication: ~6ms
- Pairing operation: ~15ms
# Specific benchmarks
make bench-g1 # G1 operations only
make bench-pairing # Pairing operations only# Run 5 real-world applications
make run-appsApplications included:
- zkSNARK Proof Verification
- BLS Multi-Signature
- Identity-Based Encryption
- Verifiable Random Function
- Anonymous Voting
# Format and check code
make check# Run everything: tests, benchmarks, quality checks
make verifyTime: 5-10 minutes
# CPU profiling
make profile-cpu
# Memory profiling
make profile-mem# Remove generated files
make clean# Show all available commands
make help- Go 1.21+
- Make