Skip to content

Commit

Permalink
doc: add comments to more structs in "halo2_backend"
Browse files Browse the repository at this point in the history
  • Loading branch information
guorong009 committed Dec 6, 2024
1 parent 652412b commit e468cce
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions halo2_backend/src/plonk/circuit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ use halo2_middleware::expression::{Expression, Variable};
use halo2_middleware::poly::Rotation;
use halo2_middleware::{lookup, permutation::ArgumentMid, shuffle};

/// Represent the index, column and rotation of a query, for backwards compatibility
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
pub struct QueryBack {
/// Query index
Expand All @@ -14,6 +15,7 @@ pub struct QueryBack {
pub(crate) rotation: Rotation,
}

/// Represent the `Query` and `Challenge`, for backwards compatibility
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
pub enum VarBack {
/// This is a generic column query
Expand Down Expand Up @@ -230,6 +232,7 @@ impl<F: Field> ConstraintSystemBack<F> {
}
}

/// A minimum version of `Gates`, which contains the constraint polynomial identities used in circuit.
struct PinnedGates<'a, F: Field>(&'a Vec<GateBack<F>>);

impl<'a, F: Field> std::fmt::Debug for PinnedGates<'a, F> {
Expand Down
2 changes: 1 addition & 1 deletion halo2_backend/src/plonk/keygen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ where
ev,
})
}

/// A map of whole queries used in the circuit
struct QueriesMap {
map: HashMap<(ColumnMid, Rotation), usize>,
advice: Vec<(ColumnMid, Rotation)>,
Expand Down

0 comments on commit e468cce

Please sign in to comment.