-
Notifications
You must be signed in to change notification settings - Fork 121
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
Signature verification in SmartContract sometimes throw "Commit failed Error: Option.value_exn None" in o1js 0.18.0 #1561
Comments
I solved it by creating a tiny ZkProgram that verifies the signature and by providing the proof instead of the signature as an argument to the SmartContract method. |
that's a confusing error for sure |
I can not even deploy contract anymore, could you please link the code @dfstio |
The code I'm referring to is at the signature-error branch. Unfortunately, I was not able to create a minimum reproducible example; all examples were working without this error; I've seen it only on a real big contract: If you're unable to deploy the contract, check first that you are using o1js 0.18.0 and deploying to devnet. |
It is also reported in Discord: https://discord.com/channels/484437221055922177/1234393036264443967 |
The error looks vaguely reminiscent of #1335 but in fact the stack trace differs if you look closely |
This error can be reproduced with this repo: The branch is signature-error, to reproduce the error you need to
The line that causes the error is https://github.com/dfstio/minanft-lib/blob/signature-error/src/contract/nft.ts#L142 |
Absolutely, but does it work with localBlockchain? It did not work for me even for localBlockchain, i am still on downgraded o1js, unfortunately |
My code works now with local blockchain, lightnet and devnet. Berkeley testnet is not supported anymore by the last version of o1js. Make sure you use await everywhere with the last o1js; the deployment can fail if you forget to do it in some line. |
Proving the following code with o1js 0.18.0
throws the error while proving. This occurs only when there is another unused method in the SmartContract that also verifies the signature. If comment the line with the verification of the signature in the other method, the code works as expected.
The code of the other method is
Unfortunately, I was unable to create a minimum reproducible example, so simply sharing the log
The text was updated successfully, but these errors were encountered: