Skip to content

Commit

Permalink
fix: build
Browse files Browse the repository at this point in the history
  • Loading branch information
Autoparallel committed Dec 11, 2024
1 parent 775bfbc commit 76ebd9a
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
2 changes: 1 addition & 1 deletion builds/target_1024b/json_extraction_1024b.circom
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ pragma circom 2.1.9;

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

component main { public [step_in] } = JSONExtraction(1024);
component main { public [step_in] } = JSONExtraction(1024, 10);
6 changes: 6 additions & 0 deletions circuits/json/extraction.circom
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ template JSONExtraction(DATA_BYTES, MAX_STACK_HEIGHT) {
signal input polynomial_input;
signal input sequence_digest;

signal input step_in[1];
signal output step_out[1];

// TODO: Change this
step_out[0] <== step_in[0];

//--------------------------------------------------------------------------------------------//
// Initialze the parser
component State[DATA_BYTES];
Expand Down
8 changes: 7 additions & 1 deletion circuits/test/json/hash_parser.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { poseidon2 } from "poseidon-lite";
import { circomkit, WitnessTester, readJSONInputFile, strToBytes, JsonMaskType, jsonTreeHasher, compressTreeHash } from "../common";

describe("Hash Parser", () => {
let hash_parser: WitnessTester<["data", "polynomial_input", "sequence_digest"]>;
let hash_parser: WitnessTester<["data", "polynomial_input", "sequence_digest", "step_in"]>;

it(`input: array_only`, async () => {
let filename = "array_only";
Expand All @@ -28,6 +28,7 @@ describe("Hash Parser", () => {
data: input,
polynomial_input,
sequence_digest,
step_in: 0
});
console.log("> First subtest passed.");

Expand All @@ -44,6 +45,7 @@ describe("Hash Parser", () => {
data: input,
polynomial_input,
sequence_digest,
step_in: 0
});
console.log("> Second subtest passed.");
});
Expand Down Expand Up @@ -73,6 +75,7 @@ describe("Hash Parser", () => {
data: input,
polynomial_input,
sequence_digest,
step_in: 0
});
console.log("> First subtest passed.");

Expand All @@ -89,6 +92,7 @@ describe("Hash Parser", () => {
data: input,
polynomial_input,
sequence_digest,
step_in: 0
});
console.log("> Second subtest passed.");
});
Expand Down Expand Up @@ -122,6 +126,7 @@ describe("Hash Parser", () => {
data: input,
polynomial_input,
sequence_digest,
step_in: 0
});
});

Expand Down Expand Up @@ -157,6 +162,7 @@ describe("Hash Parser", () => {
data: input,
polynomial_input,
sequence_digest,
step_in: 0
});
});
})

0 comments on commit 76ebd9a

Please sign in to comment.