Fix std/recursion/plonk native and emulated examples #968
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
While studying in-circuit verification with PLONK, I found the existing examples to be of great help. During my research, I discovered some flaws in them and decided to correct these issues for others who might evaluate the same feature in the future.
Fixes # (issue)Currently, there is no dedicated ticket reporting this problem. This PR is primarily a convenience change that does not alter the actual library code. Therefore, I did not think it was necessary to open a ticket. However, please let me know if doing so is required; I would be happy to create one and update this paragraph accordingly.Type of change
How has this been tested?
These examples are not actual Golang tests, but converting them for such use is straightforward. What I did was simply rename
func Example_emulated()
tofunc Example_emulated(t *testing.T)
(and did the same for the other example). This change is sufficient to transform them into Golang-style test cases and run them accordingly.One could also create a separate project and copy the code, which is a reasonable first step for anyone developing their own program with in-circuit PLONK verification.
How has this been benchmarked?
Since this is just an example, I did not perform any benchmarking.
Checklist:
No, but this does not seem relevant since the examples serve, to some extent, as tests themselves.
golangci-lint
does not output errors locallyNo, but since I'm modifying only examples, this does not seem to be relevant.