Skip to content

Commit

Permalink
adjust builds
Browse files Browse the repository at this point in the history
  • Loading branch information
Autoparallel committed Dec 11, 2024
1 parent a2d1d9d commit 775bfbc
Show file tree
Hide file tree
Showing 15 changed files with 29 additions and 41 deletions.
5 changes: 0 additions & 5 deletions builds/target_1024b/json_extract_value_1024b.circom

This file was deleted.

5 changes: 5 additions & 0 deletions builds/target_1024b/json_extraction_1024b.circom
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
pragma circom 2.1.9;

include "../../circuits/json/extraction.circom";

component main { public [step_in] } = JSONExtraction(1024);
5 changes: 0 additions & 5 deletions builds/target_1024b/json_mask_array_index_1024b.circom

This file was deleted.

5 changes: 0 additions & 5 deletions builds/target_1024b/json_mask_object_1024b.circom

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
pragma circom 2.1.9;

include "../../utils/bits.circom";
include "../utils/bits.circom";
include "hash_machine.circom";

template ParserHasher(DATA_BYTES, MAX_STACK_HEIGHT) {
template JSONExtraction(DATA_BYTES, MAX_STACK_HEIGHT) {
signal input data[DATA_BYTES];
signal input polynomial_input;
signal input sequence_digest;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ Tests for this module are located in the files: `circuits/test/parser/*.test.ts

pragma circom 2.1.9;

include "../../utils/array.circom";
include "../../utils/bits.circom";
include "../../utils/operators.circom";
include "../../utils/hash.circom";
include "../utils/array.circom";
include "../utils/bits.circom";
include "../utils/operators.circom";
include "../utils/hash.circom";
include "language.circom";

/*
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ Tests for this module are located in the files: `circuits/test/parser/*.test.ts

pragma circom 2.1.9;

include "../../utils/array.circom";
include "../../utils/operators.circom";
include "../utils/array.circom";
include "../utils/operators.circom";
include "language.circom";

/*
Expand Down
File renamed without changes.
16 changes: 8 additions & 8 deletions circuits/test/json/hash_parser.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ describe("Hash Parser", () => {
const MAX_STACK_HEIGHT = 3;

hash_parser = await circomkit.WitnessTester(`Parser`, {
file: "json/parser/hash_parser",
template: "ParserHasher",
file: "json/extraction",
template: "JSONExtraction",
params: [input.length, MAX_STACK_HEIGHT],
});
console.log("#constraints:", await hash_parser.getConstraintCount());
Expand Down Expand Up @@ -54,8 +54,8 @@ describe("Hash Parser", () => {
const MAX_STACK_HEIGHT = 3;

hash_parser = await circomkit.WitnessTester(`Parser`, {
file: "json/parser/hash_parser",
template: "ParserHasher",
file: "json/extraction",
template: "JSONExtraction",
params: [input.length, MAX_STACK_HEIGHT],
});
console.log("#constraints:", await hash_parser.getConstraintCount());
Expand Down Expand Up @@ -97,8 +97,8 @@ describe("Hash Parser", () => {
let filename = "value_array_object";
let [input, keyUnicode, output] = readJSONInputFile(`${filename}.json`, []);
hash_parser = await circomkit.WitnessTester(`Parser`, {
file: "json/parser/hash_parser",
template: "ParserHasher",
file: "json/extraction",
template: "JSONExtraction",
params: [input.length, 5],
});
console.log("#constraints:", await hash_parser.getConstraintCount());
Expand Down Expand Up @@ -129,8 +129,8 @@ describe("Hash Parser", () => {
let filename = "spotify";
let [input, keyUnicode, output] = readJSONInputFile(`${filename}.json`, []);
hash_parser = await circomkit.WitnessTester(`Parser`, {
file: "json/parser/hash_parser",
template: "ParserHasher",
file: "json/extraction",
template: "JSONExtraction",
params: [input.length, 5],
});
console.log("#constraints:", await hash_parser.getConstraintCount());
Expand Down
4 changes: 2 additions & 2 deletions circuits/test/json/parser.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ describe("json-parser", () => {
let [input, keyUnicode, output] = readJSONInputFile(`${filename}.json`, [0]);

circuit = await circomkit.WitnessTester(`Parser`, {
file: "json/parser/parser",
file: "json/parser",
template: "Parser",
params: [input.length, 2],
});
Expand All @@ -24,7 +24,7 @@ describe("json-parser", () => {
let [input, keyUnicode, output] = readJSONInputFile(`${filename}.json`, ["a"]);

circuit = await circomkit.WitnessTester(`Parser`, {
file: "json/parser/parser",
file: "json/parser",
template: "Parser",
params: [input.length, 3],
});
Expand Down
2 changes: 1 addition & 1 deletion circuits/test/json/parsing_types.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ describe("StateUpdate", () => {

before(async () => {
circuit = await circomkit.WitnessTester(`StateUpdate`, {
file: "json/parser/machine",
file: "json/machine",
template: "StateUpdate",
params: [4],
});
Expand Down
6 changes: 3 additions & 3 deletions circuits/test/json/stack.test.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { circomkit, WitnessTester, generateDescription } from "../common";
import { Delimiters, WhiteSpace, Numbers, Escape, INITIAL_IN, INITIAL_OUT } from '.';
import { Delimiters, INITIAL_IN, INITIAL_OUT } from '.';

describe("GetTopOfStack", () => {
let circuit: WitnessTester<["stack"], ["value", "pointer"]>;
before(async () => {
circuit = await circomkit.WitnessTester(`GetTopOfStack`, {
file: "json/parser/machine",
file: "json/machine",
template: "GetTopOfStack",
params: [4],
});
Expand Down Expand Up @@ -34,7 +34,7 @@ describe("StateUpdate :: RewriteStack", () => {
>;
before(async () => {
circuit = await circomkit.WitnessTester(`GetTopOfStack`, {
file: "json/parser/machine",
file: "json/machine",
template: "StateUpdate",
params: [4],
});
Expand Down
2 changes: 1 addition & 1 deletion circuits/test/json/values.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ describe("StateUpdate :: Values", () => {
>;
before(async () => {
circuit = await circomkit.WitnessTester(`GetTopOfStack`, {
file: "json/parser/machine",
file: "json/machine",
template: "StateUpdate",
params: [4],
});
Expand Down
4 changes: 1 addition & 3 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@ struct CircuitFiles {
const BASE_CIRCUIT_NAMES: &[&str] = &[
"plaintext_authentication",
"http_verification",
"json_mask_object",
"json_mask_array_index",
"json_extract_value",
"json_extraction",
];

fn read_file(path: &Path) -> Result<Vec<u8>> {
Expand Down

0 comments on commit 775bfbc

Please sign in to comment.