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

Redeployment scripts for constructor proofs #204

Merged
merged 2 commits into from
Dec 14, 2023

Conversation

MirandaWood
Copy link
Contributor

@MirandaWood MirandaWood commented Jul 4, 2023

When we have a secret state initialised in the constructor, we need a proof and verification. This can make it finicky to redeploy since we must recreate the constructor proof and sync up local dbs before the contract is deployed.
I've added a redeployment script and a short note for users in the readme.

EDIT: restart will no longer work for a running zapp since the nullifier state is kept inside the zapp js files (as opposed to a mongo container for commitments, for example)

UPDATE: Added a reinstateNullifiers method for re-adding nullifiers known to the local state, designed to be used after redeploying as above.

To test:

  • Zappify a contract with a secret state in the constructor
  • Setup and start up as normal
  • Down all containers then use the redeploy script
  • Use npm restart for APIs
  • Check an ordinary call works

@MirandaWood MirandaWood marked this pull request as ready for review July 5, 2023 13:54
@MirandaWood MirandaWood requested a review from SwatiEY July 5, 2023 13:54
@MirandaWood MirandaWood self-assigned this Jul 5, 2023
@SwatiEY SwatiEY merged commit 88b877b into master Dec 14, 2023
2 checks passed
Copy link

🎉 This PR is included in version 1.5.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

2 participants