circuit::Region: Implement add_to_lookup()

Co-authored-by: Avi Dessauer <avi.dessauer@platonic.systems>
This commit is contained in:
therealyingtong 2023-02-23 10:18:04 +08:00
parent 07655b9e7b
commit e713366c3e
1 changed files with 8 additions and 0 deletions

View File

@ -372,6 +372,14 @@ impl DynamicTable {
pub(crate) fn columns(&self) -> &[Column<Any>] {
&self.columns
}
/// Includes a row at `offset` in this dynamic lookup table.
pub fn add_row<F>(&self, region: &mut Region<F>, offset: usize) -> Result<(), Error>
where
F: Field,
{
region.add_to_lookup(self.tag(), offset)
}
}
/// This trait allows a [`Circuit`] to direct some backend to assign a witness