[Feat] Added Debug, Clone traits to TraceTable#210
Conversation
- It is required to clone the local variable trace at prove(), get_pub_inputs() levels. The 2 stages are generating proof & get public inputs which are then used in verify() function
|
Hi @abhi3700! Thank you for your pull request and welcome to our community. Action RequiredIn order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you. ProcessIn order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA. Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks! |
irakliyk
left a comment
There was a problem hiding this comment.
Thank you! The changes look good. I do want to make a couple of comments:
TraceTableis usually a fairly heavy struct - for most computations it will be anywhere between 100 MB and many GB. So, in real-world situations it may be quite expensive to clone it.- The verifier is assumed to get public inputs not from the
TraceTablebut through other means (usually, the verifier will not have access to the trace table at all). In the VDF example, the prover could provide public inputs to the verifier directly as they would be used to build the trace table anyway.

Description
This pull request aims to enhance the functionality of the
TraceTablestruct by implementing theDebugandClonetraits. For instance, this change would enable cloning of the local variabletracewhile usage at stages:prove()andget_pub_inputs()functions. These two stages are responsible for generating the proof and obtaining the public inputs, respectively, which are then utilized in theverify()function.Changes
Debugtrait for theTraceTablestruct, allowing for easier debugging and inspection of theTraceTableinstances.Clonetrait for theTraceTablestruct, enabling the cloning of the local variabletraceat theprove()andget_pub_inputs()levels.Motivation
The motivation behind this pull request is to improve the flexibility and robustness of the
TraceTablestruct by allowing it to be cloned at specific stages in the proof generation and getting public inputs levels.In the following code snippet, it was difficult to use
tracevariable when attempting to use at getting public inputs stage, as can be seen in the image below:Full Code example: