Skip to content
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

Add SemaphoreExcubia contract extension #20

Merged
merged 3 commits into from
Jul 3, 2024

Conversation

0xjei
Copy link
Member

@0xjei 0xjei commented Jul 1, 2024

Description

This PR introduces the SemaphoreExcubia extension. This excubia allows the gate to check if the passerby can generate a proof to demonstrate that it's a member of a specified Semaphore group. This contract implements a mapping to avoid using the same Semaphore identity (through nullifiers) to pass twice.

Related Issue(s)

see #18

Other information

  • Please, note that this is a porting of the MACI Semaphore Gatekeeper.
  • A 100% coverage tests with mocks (compliant to full ISemaphore interface) are provided.

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • I have run yarn format and yarn compile without getting any errors
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

@0xjei 0xjei requested review from cedoor and ctrlc03 July 1, 2024 16:35
Copy link

@ctrlc03 ctrlc03 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, left some comments

@0xjei 0xjei marked this pull request as ready for review July 2, 2024 08:37
@0xjei 0xjei requested a review from sripwoud as a code owner July 2, 2024 08:37
@0xjei 0xjei force-pushed the feat/porting-maci-gatekeepers branch from eb023ee to fb7a867 Compare July 2, 2024 08:38
@0xjei 0xjei force-pushed the feat/porting-maci-gatekeepers branch from fb7a867 to 98badde Compare July 3, 2024 15:09
0xjei added a commit that referenced this pull request Jul 3, 2024
<!-- Please refer to our CONTRIBUTING documentation for any questions on
submitting a pull request. -->
<!-- Provide a general summary of your changes in the Title above. -->

## Description

This PR removes the unused return value from `_check()` method from
`Excubia` abstract contract. See this [comment for
more](#20 (comment)).

<!-- Describe your changes in detail. -->
<!-- You may want to answer some of the following questions: -->
<!-- What kind of change does this PR introduce?** (Bug fix, feature,
docs update, ...) -->
<!-- What is the current behavior?** (You can also link to an open issue
here) -->
<!-- What is the new behavior (if this is a feature change)? -->
<!-- Does this PR introduce a breaking change?** (What changes might
users need to make in their application due to this PR?) -->

## Related Issue(s)
none
<!-- This project accepts pull requests related to open issues. -->
<!-- If suggesting a new feature or change, please discuss it in an
issue first. -->
<!-- If fixing a bug, there should be an issue describing it with steps
to reproduce. -->
<!-- Please link to the issue(s) here -->

<!-- Closes # -->
<!-- Fixes # -->

## Other information
none
<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->
<!-- Feel free to remove this section if you will not use it. -->

## Checklist

<!-- Please check if the PR fulfills these requirements. -->

-   [x] My code follows the style guidelines of this project
-   [x] I have performed a self-review of my code
- [x] I have commented my code, particularly in hard-to-understand areas
-   [x] My changes generate no new warnings
- [x] I have run `yarn format` and `yarn compile` without getting any
errors
- [x] I have added tests that prove my fix is effective or that my
feature works
-   [x] New and existing unit tests pass locally with my changes
@0xjei 0xjei force-pushed the feat/porting-maci-gatekeepers branch from 98badde to 22ba357 Compare July 3, 2024 15:26
@0xjei 0xjei requested a review from cedoor July 3, 2024 15:45
Copy link
Member

@cedoor cedoor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@0xjei 0xjei enabled auto-merge (squash) July 3, 2024 16:08
@cedoor cedoor disabled auto-merge July 3, 2024 16:25
@cedoor cedoor merged commit 1aef325 into main Jul 3, 2024
16 checks passed
@cedoor cedoor deleted the feat/porting-maci-gatekeepers branch July 3, 2024 16:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants