Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stack overflow when witness has 2048 elements #144

Closed
themighty1 opened this issue May 5, 2022 · 3 comments · Fixed by #1334
Closed

Stack overflow when witness has 2048 elements #144

themighty1 opened this issue May 5, 2022 · 3 comments · Fixed by #1334
Labels
bug Something isn't working move-to-js Refactor parts of the OCaml portion to JS

Comments

@themighty1
Copy link

Hi, I was trying to prove pre-image of 1024 Field elements with this gist and it worked fine.
However when I set the amount of Field elements to 2048 (on line 20), I get a stack oveflow error:

generating keypair...

node:internal/process/esm_loader:74
    internalBinding('errors').triggerUncaughtException(
                              ^
[
  0,
  [
    248,
    ai {
      t: 0,
      c: 'Snarky_backendless__Checked_runner.Runtime_error',
      l: 48
    },
    109
  ],
  ai {
    t: 0,
    c: 'Encountered an error while evaluating the checked computation:\n' +
      '  ("Stack overflow")\n' +
      '\n' +
      'Label stack trace:\n' +
      '\n' +
      '\n' +
      '\n',
    l: 107
  },
  0,
  [ 248, ai { t: 0, c: 'Stack_overflow', l: 14 }, -8 ],
  ai { t: 9, c: '', l: 0 }
]

Is this something I'd have to work around by hashing chunks of 1024 elements? Or is it something that you could fix? Thanks.

@mitschabaude
Copy link
Member

Love that your testing the boundaries! Let's ask someone who may know - @mrmr1993 @imeckler ideas?

@mitschabaude
Copy link
Member

Update: some quick initial poking into the issue didn't give any insight, will debug it later.
I hope it's not too important for you to get it working @themighty1?

@themighty1
Copy link
Author

@mitschabaude , thanks a lot, no it's not a blocker for me, Im ok with hashing 1024-element chunks at a time.

@mitschabaude mitschabaude added bug Something isn't working move-to-js Refactor parts of the OCaml portion to JS labels Jan 4, 2023
gabrielbosio pushed a commit to lambdaclass/o1js that referenced this issue Nov 22, 2023
Bigint backend pt 7: Cleanup TS conversion
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working move-to-js Refactor parts of the OCaml portion to JS
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants