Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: lighter stack trace by default for circuits, more verbose when -tags=debug provided #173

Merged
merged 1 commit into from
Nov 11, 2021

Conversation

gbotrel
Copy link
Collaborator

@gbotrel gbotrel commented Nov 11, 2021

Example, when testing / building with no tags (default):

 Error:          groth16(bn254): [assertIsEqual] 35 == 62
                                cubic.(*Circuit).Define
                                        cubic.go:35
                            
                                witness:{
                                    "Public": {
                                        "Y": "35"
                                    },
                                    "Secret": {
                                        "x": "3"
                                    }
                                }
                Test:           TestCubicEquation

With -tags=debug

 Error:          groth16(bn254): [assertIsEqual] 35 == 62
                               test.IsSolved.func1
                                       /Users/gbotrel/dev/go/src/github.com/consensys/gnark/test/engine.go:80
                               runtime.gopanic
                                       /usr/local/go/src/runtime/panic.go:1038
                               test.(*engine).AssertIsEqual
                                       /Users/gbotrel/dev/go/src/github.com/consensys/gnark/test/engine.go:263
                               cubic.(*Circuit).Define
                                       /Users/gbotrel/dev/go/src/github.com/consensys/gnark/examples/cubic/cubic.go:35
                           
                               witness:{
                                   "Public": {
                                       "Y": "35"
                                   },
                                   "Secret": {
                                       "x": "3"
                                   }
                               }
               Test:           TestCubicEquation

@gbotrel gbotrel added this to the v0.6.0 milestone Nov 11, 2021
@gbotrel gbotrel merged commit 22f724c into develop Nov 11, 2021
@gbotrel gbotrel deleted the feat-debug-tag branch November 11, 2021 16:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant