halo2 icon indicating copy to clipboard operation
halo2 copied to clipboard

proposal: allow add name to column

Open lispc opened this issue 2 years ago • 4 comments

to methods like instance_column , advice_column to help debugging

lispc avatar Apr 11 '22 10:04 lispc

I think these kind of additions might be also benefitial in the upstream impl (in case they want them).

In any case, this is a quite big change so I think we should first check with @kilic who mainly takes care of rebasing upstream regularly to see how this would affect his work and if it would significantly increase conflicts at rebase/merge time with upstream.

cc @barryWhiteHat as we just talked about this topic.

CPerezz avatar Apr 11 '22 12:04 CPerezz

@lispc I started some work on something similar to your proposal. See: https://github.com/zcash/halo2/pull/706

CPerezz avatar Dec 08 '22 15:12 CPerezz

Column<_> implements Copy, so you probably don't want to add a string or even a &str to the struct itself. But you could have the ConstraintSystem keep a separate vector that maps column indices to column names, which the MockProver has access to.

btw ideally do not use dyn closures for passing strings since that adds a slight runtime overhead.

jonathanpwang avatar Dec 08 '22 17:12 jonathanpwang

Column<_> implements Copy, so you probably don't want to add a string or even a &str to the struct itself. But you could have the ConstraintSystem keep a separate vector that maps column indices to column names, which the MockProver has access to.

btw ideally do not use dyn closures for passing strings since that adds a slight runtime overhead.

If you check the impl, is not the Colum who holds a String but rather the Region struct. As the naming is done at synthesize time.

Also, from all the Assigment trait implementors only MockProver does hold the namigs. Which meanst ghat no overhead happens for the real Prover.

CPerezz avatar Dec 08 '22 17:12 CPerezz