Skip to content
This repository was archived by the owner on Feb 17, 2025. It is now read-only.

Commit ce7c3ea

Browse files
committed
Correct error output #21
1 parent 4b0dd69 commit ce7c3ea

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

include/nil/blueprint/transpiler/templates/modular_verifier.hpp

+7-2
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,7 @@ contract modular_verifier_$TEST_NAME$ is IModularVerifier{
167167
transcript.update_transcript_b32_by_offset_calldata(tr_state, blob, 0x59);
168168
}
169169
170+
bool b = true;
170171
//8. Commitment scheme verify_eval
171172
{
172173
ICommitmentScheme commitment_scheme = ICommitmentScheme(_commitment_contract_address);
@@ -180,7 +181,7 @@ contract modular_verifier_$TEST_NAME$ is IModularVerifier{
180181
blob[z_offset - 0x8:], commitments, xi, tr_state.current_challenge
181182
)) {
182183
console.log("Error from commitment scheme!");
183-
return;
184+
b = false;
184185
}
185186
}
186187
@@ -198,7 +199,11 @@ contract modular_verifier_$TEST_NAME$ is IModularVerifier{
198199
unchecked{i++;}
199200
}
200201
console.log("T_consolidated = ", T_consolidated);
201-
if( F_consolidated == mulmod(T_consolidated, state.Z_at_xi, modulus) ) console.log("SUCCESS!");
202+
if( F_consolidated != mulmod(T_consolidated, state.Z_at_xi, modulus) ) {
203+
console.log("Error. Table does't satisfy constraint system");
204+
b = false;
205+
}
206+
if(b) console.log("SUCCESS!"); else console.log("FAILURE!");
202207
}
203208
204209
console.log("F[0] = ", state.F[0]);

0 commit comments

Comments
 (0)