webb-tools / zero-knowledge-gadgets

Zero-knowledge gadgets for Webb's cross-chain blockchain applications.
Apache License 2.0
89 stars 29 forks source link

redundancy fix in get_index, test added #134

Closed GhostOfGauss closed 2 years ago

GhostOfGauss commented 2 years ago

This is to close #133 .  The unnecessary call to check_membership has been removed from get_index and the validity of the path is still checked.  The number of constraints is cut in half by this change (from about 22k to about 11k).  A test is added to make sure that get_index will indeed still reject invalid paths.