-
Notifications
You must be signed in to change notification settings - Fork 197
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
Project Idea: Semaphore + Account Abstraction #345
Comments
Hi @aguzmant103, is there any detail about this project? I would love to build something with this. |
Hi @FoodChain1028, I've got some ideas about applying Semaphore on AA's wallet recovery. Since a contract-based wallet owner can assign multiple addresses as wallet guardians. We can use Semaphore to register the guardians instead of directly listing them on the smart contract. This alternation can provide privacy if the guardian's address needs to be hidden under some scenarios. |
Hi, @moven0831. This idea looks good, yet for now we have to interact the contract-based wallet with another Externally Owned Address; thus the relationship between this address and proof in revealed as a result. A method from me to fix this is using a relayer address for everyone wants to use this service, the user would send their fee (like a transferring fee and everyone need to send the same amount of money here) and proof to the relayer and relayer would do this for the users. To be more specifically, the relayer is more like a mixer box to:
|
Hey guys, this could also be useful -> https://github.com/saleel/aa-zk-test Author: @saleel |
Thanks for the tag @cedoor. It was an experiment I did a while back, and need to make some changes in that code to make it work correctly. |
Hi, @saleel, is there any chance or anything I can help you with? |
I wrote about it here - https://saleel.xyz/blog/zk-account-abstraction/ @FoodChain1028 Above is a reference implementation. There are some minor changes needed in semaphore (mentioned in the blog towards the end) before we can implement a production level semaphore wallet. But feel free to use the code as you wish, and I would be happy to help if you have any questions. |
I am PSE Core Taiwan fellow. I read through the issue and want to check:
Thank you. |
I think we still need to:
Both should be doable (though second one might be tricky as Solidity doesn't support array constants). I will check them again by next week and see if we can update. |
Thanks @saleel for listing the missing tasks!
@jimmychu0807 of course, I'll assign this issue to you! |
@saleel as seen on the above screenshot, top right (TR) is the geth run with the docker command listed in the Now, in BL, I run Then when I run I suspect they all come from the same source. Is there some Geth setting I need to update to run these account abstraction tests? Thanks. Update 2024-10-01 05:20 UTC On running semaphore wallet Another newbie question:
Given the Geth dev node returns the above message, how can I trace back from which smart contract and which function is it reverted from? I have an impression there is a way to trace it from the first 4 - 6 bytes. Thanks again p.s. I don't mind continue the trouble-shooting conversation in this issue thread, but if any of you want to move this discussion somewhere, let me know where is the best place to discuss this. I expect there will be more of it. |
The past few days I started picking up on this issue. I read thru EIP-4337, read account abstraction contract code, try running bundler, and also EIP-6900. A classmate in the core program, @quanxi1, suggests implementing Semaphore wallet in ERC-6900 way (his deck). As I believe modular smart contract account (MSCA) is going to be more widely accepted, and the plugin system is indeed a very neat way to integrate "Semaphore" component into any smart contract accounts, I am now gearing toward more on adding the Semaphore capability by writing a MSCA plugin module. This plugin will have the LMTs stored inside its storage, so there will be no problem in reading storage. I will investigate more to tackle this issue from this angle, but would love to hear from you two what you think about this approach. @quanxi1 feel free to add any insight, and I will also work with you on this. Thanks. But I first need to get saleel Semaphore wallet tests run first :) |
@jimmychu0807 Thank you for picking this up. If I remember correctly it used to work with both geth and hardhat. For the full e2e test, you need to run the bundler and use the modified Semaphore contracts inside that repo (should be configured that way already).
Yea, that would be great. Also consider ERC-7579. |
I think we can keep it here for now 👍🏽 |
Just want to report back on current status (2024-10-08)
|
@saleel if you have time, I have a favor to ask you. Referring to the Bundler README, could you run on the master branch of Bundler and get to the point to have the simple test below to pass, using Geth dev node? yarn run runop --deployFactory --network http://localhost:8545/ --entryPoint 0x0000000071727De22E5E9d8BAf0edAc6f37da032 I couldn't, and I am checking with Infinitism team. |
Did you try to parse the errdata? If its a string message you can decode here I also see a low balance message in some of your logs..maybe that is the reason? I tried running the bundler now and faced some issues; looks like there is a missing dependency when deploying contacts (some npm package doesnt have the dist published)..dont have much time to debug; good that you are checking with them. Let me know if you face issues even after setting up geth and bunder with basic tests. |
There are two repeated errdata above:
The first one seems like a string but not parsable using your tool and onlinestringtools, returning me some symbol and error messages. The second one seems to start with a function selector |
Current status (2024-10-15)
Yes there are some detours taken in the past week, but this is a good research for me and hopefully I will get more done in the coming week. |
@jimmychu0807 thanks for the updates 🙏🏽 Looks like we need to prioritize the following issues mentioned by Saleel:
Which seem to be a blocker for another AA <> Semaphore grant. Are you planning to work on them? Other community devs might also work on it. |
@cedoor alright, I will work on these two (sub-) issues first then.
|
Thanks @jimmychu0807, can you create an issue for the first one? I'll assign the second one to you, please add a comment there. |
Hey @jimmychu0807, John here from the ZK Email team at PSE. I have some familiarity building smart account modules as we built our recovery module as an ERC7579 executor. I'm also evaluating the prospective AA <> Semaphore grant @cedoor mentioned. Just trying to get my head around the approach of integrating Semaphore into a module. Can you explain what the use-case would be? Would this be a recovery module? Would it just be an easy, generic way to use Semaphore for smart accounts? Something else? |
Hi @JohnGuilding, thank you for checking. cedoor did point out to me there is a grant proposal of Semaphore Paymaster. This module I want to build is to focus on having Semaphore group members able to sign a transaction of the smart wallet. In fact, this idea has been explored by Saleel, and is documented in his blogpost. But it was built at a time when the tool stack was still primitive. I aim to formalize this so it becomes an ERC-7579 compatible module and smart account owners can easily install it. Saleel also pointed out two challenges he saw in current implementation (other challenge section of the blogpost) that restrict Semaphore from directly being used in smart account. They will be solved along the way (one is solved already with #875). There are also two issues I want to investigate first before formalizing my thought into a grant proposal:
I am currently investigating them, but will be glad to hear your thought about this direction, and any potential roadblocks you see I will encounter. Thanks. |
No description provided.
The text was updated successfully, but these errors were encountered: