-
Notifications
You must be signed in to change notification settings - Fork 0
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
Merkle Memberships Program; Clean up #2
Conversation
ddb8b08
to
f34c12f
Compare
f34c12f
to
2afdd64
Compare
b2319f6
to
accb962
Compare
accb962
to
230514e
Compare
Additionally, I think that we will need to rethink the IProver interface. Good that we don't use it anywhere yet. |
0c810c5
to
4fdf63b
Compare
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 a nice functional implementation but got noisy. Typescript syntax is not very beautiful it appears. I'll propose some changes.
src/plugins/merkleMemberships/common/merkleMembershipsProgram.ts
Outdated
Show resolved
Hide resolved
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.
There are some changes required.
Please try to add some docstrings already. They don't have to be beautiful yet, but should explain the high-level operations of the code. To make it easier to understand how the proof is achieved etc.
Additionaly, we need the headless client to be able to test the flow of the updated plugin.
It can be done with another PR though.
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.
The leaf index problem is still unresolved. The server should be sending the entire tree or all the leaves to ensure anonimity.
)(proof); | ||
} | ||
|
||
async fetchPublicInputs( |
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.
The problem here is that asking for a specific index of the tree reveals the identity.
The only solution is to transfer the entire tree. Then it should be searched for the index and this way the witness could be generated.
If there's no easy way to serialize the tree then the list of all leaves should be send and the tree should be rebuilt.
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 is apparently not very efficient. I don't see why this hurts anonymity - a client can always make a bunch of junk requests to confuse the server if the server decides to log the traffic.
Aside from that, I have some concerns regarding the security of this implementation - if someone knows the value x where Is this possible? Not so familiar with the poseidon hash algorithm.Poseidon.hash([x]) == Field(0)
and if any of the trees have one or more holes, we are screwed.
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.
Approving before the deeper review.
No description provided.