Skip to content

Commit

Permalink
chore(zk): add comment for ownership representation
Browse files Browse the repository at this point in the history
  • Loading branch information
chokobole committed Dec 4, 2023
1 parent 0f333d6 commit c92eafb
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions tachyon/zk/base/halo2/halo2_random_field_generator.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ class Halo2RandomFieldGenerator : public RandomFieldGenerator<F> {
return F::FromMontgomery(d2) + F::FromMontgomery(d3);
}

// not owned
crypto::XORShiftRNG* const generator_;
};

Expand Down
1 change: 1 addition & 0 deletions tachyon/zk/expressions/evaluator/simple_evaluator.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ class SimpleEvaluator
~ScopedIdxIncrement() { ++evaluator->idx_; }

private:
// not owned
SimpleEvaluator* const evaluator;
};
ScopedIdxIncrement scoped_idx_increment(this);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,9 @@ class SimpleLookupTableLayouter : public LookupTable<F>::Layouter {
}

private:
// not owned
Assignment<F>* const assignment_;
// not owned
const std::vector<LookupTableColumn>* const used_columns_;
absl::flat_hash_map<LookupTableColumn, Value> values_;
};
Expand Down
2 changes: 2 additions & 0 deletions tachyon/zk/plonk/circuit/floor_planner/single_chip_layouter.h
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ class SingleChipLayouter : public Layouter<F> {
}

private:
// not owned
SingleChipLayouter* const layouter_;
const size_t region_index_;
// Stores the constants to be assigned, and the cells to which they are
Expand Down Expand Up @@ -282,6 +283,7 @@ class SingleChipLayouter : public Layouter<F> {
std::vector<FixedColumnKey> constants)
: assignment_(assignment), constants_(std::move(constants)) {}

// not owned
Assignment<F>* const assignment_;
std::vector<FixedColumnKey> constants_;
// Stores the starting row for each region.
Expand Down
1 change: 1 addition & 0 deletions tachyon/zk/plonk/circuit/lookup_table.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ class LookupTable {
explicit LookupTable(Layouter* layouter) : layouter_(layouter) {}

private:
// not owned
Layouter* const layouter_;
};

Expand Down
1 change: 1 addition & 0 deletions tachyon/zk/plonk/circuit/namespaced_layouter.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ class NamespacedLayouter : public Layouter<F> {
}

private:
// not owned
Layouter<F>* const layouter_;
};

Expand Down
1 change: 1 addition & 0 deletions tachyon/zk/plonk/circuit/region.h
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ class Region {
}

private:
// not owned
Layouter* const layouter_;
};

Expand Down
1 change: 1 addition & 0 deletions tachyon/zk/plonk/circuit/virtual_cells.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ class VirtualCells {
}

private:
// not owned
ConstraintSystem<F>* const meta_;
std::vector<Selector> queried_selectors_;
std::vector<VirtualCell> queried_cells_;
Expand Down

0 comments on commit c92eafb

Please sign in to comment.