You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Which is super annoying to read. I would like to see this instead
[1, 1, 1, 0, 0, ...
Another example, maybe I want to print a list of columns as a table.
Another example, maybe I want to do setup, proof + verify given a circuit, and I don't care about the transcript hash, or the engine, the commitment scheme, the prover strategy, etc.
My proposal is to have an implementation of these utilities in a new crate but they don't need to be super clean, they could be targeted to debugging and development, so we don't put high bar on their API or stability (that would be a plus but not a requirement). The main goal would be to be useful.
Here's a list of particular things I would like
PrettyF type that wraps F or &F and implements Display in a smart way:
If the number is small, format it in decimal
If the number is a power of two, format it as 2^k
If the number is big, format it as hex (without leading zeroes)
If the number is equivalent to a small negative number, show it as -x
Type that wraps Vec<F> or &[F] and implements Display using PrettyF
Function to print a table out of multiple Vec<F> or &[F] with names per column, and using PrettyF.
Set of functions to generate setup, prove and verify only taking as inputs the value k and circuit (and making choices for the rest). Compatible with the frontend-backend split API.
The text was updated successfully, but these errors were encountered:
I would like to propose introducing a new crate with debugging and testing utilities.
I constantly find myself rewriting the same debugging functions and boilerplate for cases like:
Vec<F>
and you want to print it. If you useprint!("{:?}", column)
whereF
isbn256::Fr
you get this:Which is super annoying to read. I would like to see this instead
Another example, maybe I want to print a list of columns as a table.
Another example, maybe I want to do setup, proof + verify given a circuit, and I don't care about the transcript hash, or the engine, the commitment scheme, the prover strategy, etc.
@zemse actually made a repository with utilities like this: https://github.com/zemse/halo2-utils?tab=readme-ov-file#print-assignments
My proposal is to have an implementation of these utilities in a new crate but they don't need to be super clean, they could be targeted to debugging and development, so we don't put high bar on their API or stability (that would be a plus but not a requirement). The main goal would be to be useful.
Here's a list of particular things I would like
PrettyF
type that wrapsF
or&F
and implementsDisplay
in a smart way:-x
Vec<F>
or&[F]
and implementsDisplay
usingPrettyF
Vec<F>
or&[F]
with names per column, and usingPrettyF
.The text was updated successfully, but these errors were encountered: