Skip to content

Commit

Permalink
Mina base public input updated #78
Browse files Browse the repository at this point in the history
  • Loading branch information
ETatuzova committed Jun 30, 2023
1 parent c239cba commit 82f5e7e
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions test/mina-placeholder-verifier-proof-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ describe('Mina state proof validation tests', function () {
public_input.push(point[0]);
public_input.push(point[1]);
}
public_input.push(BigInt(3));

return public_input;
}
Expand Down Expand Up @@ -229,6 +230,13 @@ describe('Mina state proof validation tests', function () {
losslessJSON.parse(fs.readFileSync(path.resolve(__dirname, "./data/kimchi.json"),"utf8")),
losslessJSON.parse(fs.readFileSync(path.resolve(__dirname, "./data/kimchi_const.json"),"utf8"))
);
public_input_json = "[\n";
for( i = 0; i < params['public_inputs'][0].length; i++ ){
if(i != 0) public_input_json += ",\n";
public_input_json += params['public_inputs'][0][i].toString();
}
public_input_json += "]";
fs.writeFileSync("public_input_base.json", public_input_json)

// For proof 2
let scalar_params = loadParamsFromFile(path.resolve(__dirname, "./data/verifier_params_state_scalar.json"));
Expand All @@ -238,6 +246,13 @@ describe('Mina state proof validation tests', function () {
losslessJSON.parse(fs.readFileSync(path.resolve(__dirname, "./data/kimchi.json"),"utf8")),
losslessJSON.parse(fs.readFileSync(path.resolve(__dirname, "./data/kimchi_const.json"),"utf8"))
);
public_input_json = "[\n";
for( i = 0; i < params['public_inputs'][1].length; i++ ){
if(i != 0) public_input_json += ",\n";
public_input_json += params['public_inputs'][1][i].toString();
}
public_input_json += "]";
fs.writeFileSync("public_input_scalar.json", public_input_json)

return params;
}
Expand Down

0 comments on commit 82f5e7e

Please sign in to comment.