-
Notifications
You must be signed in to change notification settings - Fork 12
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
Improve mock prover errors printing #182
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
hero78119
approved these changes
Sep 4, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome job for improving the readiblity of error message 👍 👍
Just left some optionally optimisation suggestion
- some imperative programming style e.g.
alloc vec![]; for xxxx {push sth to vec}
can eitherVec::with_capacity()
in advance or use functional styleiter().map(||xxxxx).collect()
- some left over comments can be clean up
hero78119
approved these changes
Sep 4, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
hero78119
added a commit
that referenced
this pull request
Sep 30, 2024
- fmt `Goldilocks(18446744069414584319)` as `-2` as well as `Sum` `Product` expressions. - include instance id and relevant wit in. ### Before ``` AssertEqualError "test_assert_zero_1/require_equal/a + 1 == b": Left != Right Left: GoldilocksExt2([Goldilocks(4), Goldilocks(0)]) Right: GoldilocksExt2([Goldilocks(5), Goldilocks(0)]) Left Expression: ScaledSum(WitIn(1), Constant(Goldilocks(1)), Constant(Goldilocks(0))) Right Expression: Sum(ScaledSum(WitIn(0), Constant(Goldilocks(1)), Constant(Goldilocks(0))), Constant(Goldilocks(1))) AssertZeroError "test_assert_zero_1/require_zero/c - 2 == 0": Evaluated expression is not zero Expression: Sum(ScaledSum(WitIn(2), Constant(Goldilocks(1)), Constant(Goldilocks(0))), Constant(Goldilocks(18446744069414584319))) Evaluation: GoldilocksExt2([Goldilocks(18446744069414584322), Goldilocks(0)]) LookupError "test_lookup_1/assert_u5/assert u5": Evaluated expression does not exist in T vector Expression: ScaledSum(WitIn(0), Challenge(1, 1, GoldilocksExt2([Goldilocks(1), Goldilocks(0)]), GoldilocksExt2([Goldilocks(0), Goldilocks(0)])), Challenge(0, 1, GoldilocksExt2([Goldilocks(1), Goldilocks(0)]), GoldilocksExt2([Goldilocks(0), Goldilocks(0)]))) Evaluation: GoldilocksExt2([Goldilocks(1000001), Goldilocks(0)]) ``` ### After ``` AssertEqualError "test_assert_zero_1/require_equal/a + 1 == b" Left: GoldilocksExt2[4,0] != Right: GoldilocksExt2[5,0] Left Expression: 1 * WitIn(1) + 0 Right Expression: 1 * WitIn(0) + 0 + 1 Inst[0]: WitIn(1)=4,WitIn(0)=4 AssertZeroError "test_assert_zero_1/require_zero/c - 2 == 0": Evaluated expression is not zero Expression: 1 * WitIn(2) + 0 + (-2) Evaluation: GoldilocksExt2[1,0] != 0 Inst[1]: WitIn(2)=3 LookupError "test_lookup_1/assert_u5/assert u5": Evaluated expression does not exist in T vector Expression: Challenge(1) * WitIn(0) + Challenge(0) Evaluation: GoldilocksExt2[1000001,0] Inst[1]: WitIn(0)=1000 ``` --------- Co-authored-by: Ming <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Goldilocks(18446744069414584319)
as-2
as well asSum
Product
expressions.Before
After