GuildOfWeavers / genSTARK

A library for generating zk-STARKs.
MIT License
142 stars 18 forks source link

error when running examples #29

Closed themighty1 closed 2 years ago

themighty1 commented 2 years ago

HI, I have ts-node v10.7.0 and tried to run ts-node fibonacci.ts from examples/demo as well as other examples I get the same error below. Could you advise on how to work around this. Maybe a different version of ts-node is needed? Thanks.

The error log: ` /home/default2/.nvm/versions/node/v15.14.0/lib/node_modules/ts-node/src/index.ts:820 return new TSError(diagnosticText, diagnosticCodes); ^ TSError: ⨯ Unable to compile TypeScript: ../../lib/Stark.ts:101:76 - error TS2345: Argument of type 'unknown' is not assignable to parameter of type 'Error | undefined'.

101 throw new StarkError(Failed to generate the execution trace, error);

../../lib/Stark.ts:143:61 - error TS2345: Argument of type 'unknown' is not assignable to parameter of type 'Error | undefined'.

143             throw new StarkError('Low degree proof failed', error);

../../lib/Stark.ts:212:90 - error TS2345: Argument of type 'unknown' is not assignable to parameter of type 'Error | undefined'.

212 error = new StarkError(Verification of evaluation Merkle proof failed, error);

../../lib/Stark.ts:242:71 - error TS2345: Argument of type 'unknown' is not assignable to parameter of type 'Error | undefined'.

242             throw new StarkError('Verification of low degree failed', error);
at createTSError (/home/default2/.nvm/versions/node/v15.14.0/lib/node_modules/ts-node/src/index.ts:820:12)
at reportTSError (/home/default2/.nvm/versions/node/v15.14.0/lib/node_modules/ts-node/src/index.ts:824:19)
at getOutput (/home/default2/.nvm/versions/node/v15.14.0/lib/node_modules/ts-node/src/index.ts:1014:36)
at Object.compile (/home/default2/.nvm/versions/node/v15.14.0/lib/node_modules/ts-node/src/index.ts:1322:43)
at Module.m._compile (/home/default2/.nvm/versions/node/v15.14.0/lib/node_modules/ts-node/src/index.ts:1454:30)
at Module._extensions..js (node:internal/modules/cjs/loader:1121:10)
at Object.require.extensions.<computed> [as .ts] (/home/default2/.nvm/versions/node/v15.14.0/lib/node_modules/ts-node/src/index.ts:1458:12)
at Module.load (node:internal/modules/cjs/loader:972:32)
at Function.Module._load (node:internal/modules/cjs/loader:813:14)
at Module.require (node:internal/modules/cjs/loader:996:19) {

diagnosticCodes: [ 2345, 2345, 2345, 2345 ] } `

bobbinth commented 2 years ago

Hi - thanks for filing this issue! This repo hasn't been updated in a while. If you are interested in using STARKs, I'd recommend Winterfell. It is a much more up-to-date implementation of STARK protocol and is also much more performant.

themighty1 commented 2 years ago

Thanks, that impl looks good.