#zkPrograms using `SelfProof` gets stuck in the compilation step in the browser

13 messages · Page 1 of 1 (latest)

vale bramble
#

Facing this issue with the latest o1js versions. I narrowed the problem to this

export const TestZkProgram = ZkProgram({
  name: 'TestZkProgram',
  publicInput: Field,
  publicOutput: Field,
  methods: {
    add: {
      privateInputs: [SelfProof],
      async method(a: Field, b: SelfProof<Field, Field>) {
        return a.add(b.publicOutput);
      },
    },
  },
});

the above zkProgram compiles in a node environment, but when tried to compile in browser it gets stuck, with no errors in console log. :/

vivid lodge
#

Is there anything else you are compiling before it? eg smart contracts that may consume memory?

opaque dagger
#

Which framework are you using?

vale bramble
vale bramble
fickle ether
#

For some reason, I see the difference in the behavior on the local and deployed versions of the frontend; probably it is related to CORS issues.

In such cases, I just deploy the frontend to the site and then debug the deployed version.

Also, this can happen if RSS memory is low.

vale bramble
maiden cedar
vale bramble
vale bramble
#

With react/next also, the compile step gets stuck

thick palm
vale bramble
fickle ether