[Feat] Added Debug, Clone traits to TraceTable #210
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This pull request aims to enhance the functionality of the
TraceTable
struct by implementing theDebug
andClone
traits. For instance, this change would enable cloning of the local variabletrace
while 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
Debug
trait for theTraceTable
struct, allowing for easier debugging and inspection of theTraceTable
instances.Clone
trait for theTraceTable
struct, enabling the cloning of the local variabletrace
at theprove()
andget_pub_inputs()
levels.Motivation
The motivation behind this pull request is to improve the flexibility and robustness of the
TraceTable
struct 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
trace
variable when attempting to use at getting public inputs stage, as can be seen in the image below:Full Code example: