You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
By changing from https://github.com/semaphore-protocol/semaphore's default merkleTree to ours LinkableIncrementalBinaryTree.sol we introduced a problem on the removeMember method.
This is caused by our historyRoot array and by the edgeHistory. If a user gets removed from the merkle tree at some block then it could still interact with the contract for at least historySize-1 group modifications. Same stands for edgeHistory, but with the updates being relayer updates for updateEdge.
Possible solutions
Set historySize=1.
This avoids the problem, but introduces a front-running opportunity for denying service to some user.
Keep historySize=30, but set currentRootIndex to 0 whenever a removal happens.
This essentially clears the history of merkleRoots, thereby resolving the late interaction problem described above.
The text was updated successfully, but these errors were encountered:
semaraugusto
changed the title
[BUG] Remove member is problematic on the cross-chain setting
[BUG] Remove member is problematic on LinkableIncrementalBinaryTree
Nov 2, 2022
Describe the bug
By changing from
https://github.com/semaphore-protocol/semaphore
's default merkleTree to oursLinkableIncrementalBinaryTree.sol
we introduced a problem on the removeMember method.This is caused by our historyRoot array and by the edgeHistory. If a user gets removed from the merkle tree at some block then it could still interact with the contract for at least
historySize-1
group modifications. Same stands for edgeHistory, but with the updates being relayer updates forupdateEdge
.Possible solutions
Set
historySize=1
.This avoids the problem, but introduces a front-running opportunity for denying service to some user.
Keep
historySize=30
, but setcurrentRootIndex
to 0 whenever a removal happens.This essentially clears the history of merkleRoots, thereby resolving the late interaction problem described above.
The text was updated successfully, but these errors were encountered: