Skip to content
New issue

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

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

Already on GitHub? # to your account

Fix correctness issue in ZkProgram typing #1962

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

rpanic
Copy link
Contributor

@rpanic rpanic commented Dec 20, 2024

Currently, the ZkProgram method declares a lot of convenience types as generic parameters. However, this leads to wrong typings when explicitly typing those generic parameters as they become inconsistent with the original ZkProgram's Config and therefore the resulting ZkProgram.
Furthermore, this hugely increases friction when trying to type anything outside of o1js that does stuff with ZkPrograms in some way.

@rpanic rpanic requested review from a team as code owners December 20, 2024 13:44
@rpanic rpanic requested review from boray and ymekuria December 20, 2024 13:44
@rpanic rpanic changed the title Fixed correctness issue in ZkProgram typing Fix correctness issue in ZkProgram typing Dec 20, 2024
Copy link
Collaborator

@mitschabaude mitschabaude left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

haven't tested intellisense yet, but this seems like a great idea to me!

src/lib/proof-system/zkprogram.ts Outdated Show resolved Hide resolved
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants