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

Compiling ZkProgram in the browser never ends #1891

Open
berkay1532 opened this issue Nov 7, 2024 · 3 comments
Open

Compiling ZkProgram in the browser never ends #1891

berkay1532 opened this issue Nov 7, 2024 · 3 comments

Comments

@berkay1532
Copy link

I noticed that a simple zkprogram I created did not compile in the browser. Then I tried to compile the zkprogram in the tutorial to see if the problem was with my program, but it did not compile either. Finally, when I removed the "SelfProof" parts in the zkprogram and compiled it, I saw that the process was completed without any problems. That's why I decided to open an issue about this.

Tutorial ZkProgram
`
const Add = ZkProgram({
name: 'add-example',
publicInput: Field,

methods: {
init: {
privateInputs: [],

  async method(state: Field) {
    state.assertEquals(Field(0));
  },
},

addNumber: {
  privateInputs: [SelfProof, Field],

  async method(
    newState: Field,
    earlierProof: SelfProof<Field, void>,
    numberToAdd: Field
  ) {
    earlierProof.verify();
    newState.assertEquals(earlierProof.publicInput.add(numberToAdd));
  },
},

add: {
  privateInputs: [SelfProof, SelfProof],

  async method(
    newState: Field,
    earlierProof1: SelfProof<Field, void>,
    earlierProof2: SelfProof<Field, void>
  ) {
    earlierProof1.verify();
    earlierProof2.verify();
    newState.assertEquals(
      earlierProof1.publicInput.add(earlierProof2.publicInput)
    );
  },
},

},
});
`

@YofiY
Copy link

YofiY commented Nov 9, 2024

I have been having the same issue.

@45930
Copy link
Contributor

45930 commented Nov 10, 2024

What version of o1js are you using? Could you make sure it's either 1.9.1 or 2.0.0?

@berkay1532
Copy link
Author

Yes i tried both.Unfortunately neither worked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants