Skip to content

Commit

Permalink
fix: instance/subquery padding (#31)
Browse files Browse the repository at this point in the history
  • Loading branch information
rpalakkal authored Jan 18, 2024
1 parent 4d60730 commit 30953a1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions circuit/js/src/circuitRunner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,12 @@ const padInstances = () => {
const numDataInstances = dataInstances.length;

for (let i = numUserInstances; i < USER_COMPUTE_NUM_INSTANCES; i++) {
let witness = halo2Lib.witness("0");
let witness = halo2Lib.constant("0");
userInstances.push(witness);
}

for (let i = numDataInstances; i < SUBQUERY_NUM_INSTANCES; i++) {
let witness = halo2Lib.witness("0");
let witness = halo2Lib.constant("0");
dataInstances.push(witness);
}

Expand Down
2 changes: 1 addition & 1 deletion circuit/js/src/subquery/data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export const prepData = async (dataSubquery: DataSubquery, queryArr: CircuitValu

let paddedQueryArr = [circuitType, ...queryArr];
for (let i = queryArr.length; i < 13; i++) {
paddedQueryArr.push(getCircuitValueWitness(0));
paddedQueryArr.push(getCircuitValueConstant(0));
}
paddedQueryArr.push(witness.hi());
paddedQueryArr.push(witness.lo());
Expand Down

0 comments on commit 30953a1

Please sign in to comment.