Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add halo2_debug package #346

Merged
merged 2 commits into from
Jun 10, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ members = [
"halo2_frontend",
"halo2_middleware",
"halo2_backend",
"halo2_debug",
"p3_frontend",
]
resolver = "2"
10 changes: 8 additions & 2 deletions halo2_backend/src/plonk/circuit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ pub enum VarBack {
Challenge(ChallengeMid),
}

impl std::fmt::Display for VarBack {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "{:?}", self)
}
}

impl Variable for VarBack {
fn degree(&self) -> usize {
match self {
Expand All @@ -40,8 +46,8 @@ impl Variable for VarBack {
}
}

fn write_identifier<W: std::io::Write>(&self, _writer: &mut W) -> std::io::Result<()> {
unimplemented!("unused method")
fn write_identifier<W: std::io::Write>(&self, writer: &mut W) -> std::io::Result<()> {
write!(writer, "{}", self)
}
}

Expand Down
27 changes: 27 additions & 0 deletions halo2_debug/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
[package]
name = "halo2_debug"
version = "0.3.0"
authors = [
"Privacy Scaling Explorations team",
]
edition = "2021"
rust-version = "1.66.0"
description = """
Halo2 Debug. This package contains utilities for debugging and testing within
the halo2 ecosystem.
"""
license = "MIT OR Apache-2.0"
repository = "https://github.com/privacy-scaling-explorations/halo2"
documentation = "https://privacy-scaling-explorations.github.io/halo2/"
categories = ["cryptography"]
keywords = ["halo", "proofs", "zkp", "zkSNARKs"]

[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs", "--html-in-header", "katex-header.html"]

[dependencies]
ff = "0.13"
halo2curves = { version = "0.6.1", default-features = false }
num-bigint = "0.4.5"
halo2_middleware = { path = "../halo2_middleware" }
Loading
Loading