-
Notifications
You must be signed in to change notification settings - Fork 7
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
doc: Off chain contract registry #6
base: main
Are you sure you want to change the base?
Conversation
I guess I see these paths:
So I think this proposal nicely satisfies 2, iiuc? |
Exactly! It's equivalent to 1 in that it's made available for everyone, but it's cheaper since it doesn't take up DA. |
|
||
#### GET `/contracts/{address}.json` | ||
|
||
Returns the JSON-serialized contract instance for the given address, which includes the class identifier. |
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.
Remind me again what would go in here? Is it simply the class id, the initialisation args/hash, deployer address etc?
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.
Exactly!
salt
deployer
contractClassId
initializationHash
publicKeysHash
Just seeing this, and wanted to mention that it reminds me of docker(hub). With that in mind, it feels like we're talking about two products in this design: our canonical registry is dockerhub, and the local client that the PXE uses is the other. So I'm wondering if the local client can be configurable such that it supports alternative/private registries (like docker). In that case, we'd have good support for path 5 pointed out by @iAmMichaelConnor Also, is this a product that would be useful for noir contracts/programs outside of Aztec? I'm just thinking about how decoupled it should be from the PXE, and if that changes the design. I don't think we need all that at the moment, but designing our first implementation with that in mind might result in cleaner code and dividends in the future. How/where were you planning on plugging this into the PXE? |
@just-mitch I was thinking of doing something simple, where if the PXE couldn't find bytecode during a simulation in its local db (
It's a good point. Maybe something where we provide contract artifacts indexed by verification key, assuming the vk is a good enough identifier? @Savio-Sou do you think this would be useful for zk-apps built with Noir? The TLDR here is having a web2 repository (think something like Sourcify) where people can upload compilation artifacts (or even sources), indexed either by Aztec address or Noir verification key. |
That would be awesome! The Noir community has been relying on a barebone README to find libraries. |
Not if devs are on different proving backends 🤔 I believe Noir's compiled artifacts come with checksums; @TomAFrench is that the |
That hash is not suitable for this purpose as we need to derive it from the compiled ACIR whereas that it derived during the compilation process. Verification key doesn't seem to cover all situations as we need to handle multi-circuit programs and as you mention we'd end up with a proving-system specific index. |
To be clear, this would not be a replacement for a human-indexed list of available libraries, but rather something that a proving client would use under the hood. Think you have a zkpassport of sorts, and instead of having to bundle all circuits needed within it, apps could just say "I need a proof that you are over 18, which corresponds to a circuit with id X", and then your client would use the registry to find what's the ACIR for X and generate the proof, and if the user is a dev, present them with the corresponding source code. But now that I'm writing it, I'm not sure it makes much sense in the context of zk-apps. Every wallet or app would have circuits specific to them and bundle them within their code most likely. The need for a sourcify-like registry is more for interoperability, as we'd have in the aztec network. All that said, a searchable crates.io-like thing (or like this one) sounds great. Probably a good project for a grant! |
"Proving client" as in e.g. a level between private smart contract devs' code <> PXE? |
In the context of Aztec Network, this would be the user wallet that runs the local proofs, in particular yeah, the PXE |
Any status/update on this one? |
Adds a proposal for an off-chain contract registry.