This is the error I encountered when I called assertOut:
The debug message indicated that the process stopped at reading the .sym file in loadSymbols.
|
const symsStr = await fs.promises.readFile( |
According to claud.ai the reason is that the file is too large for fs.readFile (in my case the file is 678MB). After switching to the implementation below the issue was solved.
async loadSymbols() {
if (this.symbols) return;
this.symbols = {};
const fileStream = fs.createReadStream(
path.join(this.dir, this.baseName + ".sym"),
{ encoding: "utf8" }
);
const rl = readline.createInterface({
input: fileStream,
crlfDelay: Infinity,
});
for await (const line of rl) {
const arr = line.split(",");
if (arr.length !== 4) {
continue;
}
this.symbols[arr[3]] = {
labelIdx: Number(arr[0]),
varIdx: Number(arr[1]),
componentIdx: Number(arr[2]),
};
}
}
This is the error I encountered when I called
assertOut:The debug message indicated that the process stopped at reading the
.symfile inloadSymbols.circom_tester/common/tester.js
Line 217 in de72423
According to claud.ai the reason is that the file is too large for
fs.readFile(in my case the file is 678MB). After switching to the implementation below the issue was solved.