-
Notifications
You must be signed in to change notification settings - Fork 550
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
Add marlin repo sha to snark key identity #6208
Conversation
@@ -14,4 +14,5 @@ | |||
snarky.backendless | |||
sponge | |||
snarkette | |||
coda_version |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This adds a transitive dependency to everything above this library on universe
. I can't think of any easy fix for it, but we should try to come up with one ASAP, or push forward with moving these things out of the build process altogether.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not ideal, but if we change the zexe interface so that we thread the marlin repo sha down to it instead of baking it in at that layer, we could hack around this. It's not a great solution imo, but it would fix rebuilding zexe_backend every single build, which seems worth it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I may be able to do a hack where I depend on the source tree of the marlin repo in external and generate a file internally to zexe_backend that contains the sha for it. If I do it right, it will only trigger a rebuild when the marlin repo changes, but we'll see if I can get dune to play nice like that. I'll test it out some before I merge this.
I've been working on caching these keys in the docker image before even building the main daemon (and ran into issues because the v2 keys aren't static), a tool in the marlin repo for consistently doing that would be nice and is probably the better place to standardize. Does this also help avoid the |
To add some clarity on what we do in CI: The build artifact job runs |
@lk86 any changes to the snark code will require new keys, so sticking them in the docker image only works until the constraint system next changes. The real fix for this would be to move key generation out of the coda.exe build entirely and manage them separately. |
Deploy preview for mina-staging ready! Built with commit a1b60c3 |
I think we should start moving towards this soon. This seems like the best solution. The docker solution is not great since the keypairs can change too frequently (and they are pretty big), and having the daemon generate it is messy. |
@mrmr1993 I managed to remove the new zexe dependency on |
We hit a bug in a testnet recently where the snark keys change from underneath the network in s3, causing nodes which were restarted by kubernetes to download different snark keys and end up in an incompatible state where they cannot verify proofs from the network. As a fix to this problem, I'm not adding the marlin repo sha to the snark key's s3 storage key so that any updates to the marlin repo (which would make incompatible keys) will create a different keypair in s3, avoiding the problem in the future.
2 notes about these changes:
_v2
in the keypair name now that the marlin repo sha is in there. I didn't do that for now, but if that's the case, I can make that change.