-
Notifications
You must be signed in to change notification settings - Fork 20
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
feat: integrate zkLogin #7
base: main
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: c2847ae The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@olehmisar is attempting to deploy a commit to the Ithaca Team on Vercel. A member of the Team first needs to authorize it. |
It looks like some bundlers are also not happy with usage of pedersen in |
@jxom i would instead remove @aztec/foundation altogether in favour of @aztec/bb.js. It will still require polyfilling |
Sounds great! I am also wondering what we can do to mitigate the massive bundle size jump. It seems that this adds ~890kB to the brotli minified bundle.
Can repro by running |
@jxom I removed @aztec/foundation and all polyfills. The large size of bundle is due to the size of |
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.
notes
@@ -606,6 +608,71 @@ export declare namespace prepareInitialize { | |||
} | |||
} | |||
|
|||
const zkLogin = new zklogin.ZkLogin() |
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.
probably shouldn't be initialized here
// TODO: import from `@shield-labs/zklogin` | ||
type ZkLoginProvider = 'google' // | 'apple' |
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.
fix this todo
What should we do about the published certs? I don't want the registry to be onlyOwner nor multisig/dao, would strongly want immutable. Maybe we have versions in the registry and users can opt-in to a rotation? |
@gakonst certs are rotated regularly, so we can’t make them immutable. We can probably leverage a blind oracle (aka TLSNotary) to publish certs. It’s an MPC network running inside a bunch of TEEs that do not see what they signs. It requires Porto to depend on an oracle service provider. vlayer.xyz provides this kind of service. |
not comfortable w/ introducing such 3rd party deps...will think about it. maybe we run this ourselves. |
the choice boils down to a multisig oracle. TLDR: MPC with no secret data = a multisig. A blind oracle that posts exclusively Google/Apple certs = a multisig. Why other options will not work:
|
Circling back... @olehmisar did u get any news on this? That'd be epic if we could get done. I'm talking with the CF team about potentially doing SXG for the certs, circling back soon. |
@gakonst yes, we can reduce the size at least by a factor of x2. And if that’s not enough, we can then bundle an application-specific wasm that only includes functions needed for zklogin to reduce size even more |
Also worth looking into https://github.com/zkemail/jwt-tx-builder |
They are similar. ZkLogin has a nicer API imo as I tried to keep it as simple as possible. Are you missing anything specific in zkLogin from jwt-tx-builder? Also, @gakonst are there any updates from cloudflare regarding jwt public keys over SXG? |
Uses
@shield-labs/zklogin
package.TODO:
experimental_addBackup
experimental_recover
experimental_removeBackup
,experimental_listBackups
The spec should look something like this: