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

fix(circuits): valid message censoring #1198

Closed
wants to merge 1 commit into from

Conversation

ctrlc03
Copy link
Collaborator

@ctrlc03 ctrlc03 commented Feb 15, 2024

Description

Prevent a coordinator from censoring the second valid vote of an user by setting currentVoteWeight to 0.

With this fix, they are forced to send the previous vote weight for the option index of the current processed message, otherwise the inclusion proof will fail to validate due to merkle root mismatch

Confirmation

Copy link

netlify bot commented Feb 15, 2024

Deploy Preview for maci-typedoc ready!

Name Link
🔨 Latest commit d747b06
🔍 Latest deploy log https://app.netlify.com/sites/maci-typedoc/deploys/65d33300e108b80008df7451
😎 Deploy Preview https://deploy-preview-1198--maci-typedoc.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@ctrlc03 ctrlc03 self-assigned this Feb 15, 2024
@ctrlc03 ctrlc03 changed the title Fix/second valid message censoring fix(circuits): valid message censoring Feb 15, 2024
Copy link
Collaborator

@0xmad 0xmad left a comment

Choose a reason for hiding this comment

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

@ctrlc03 thanks!

@0xmad 0xmad force-pushed the fix/second-valid-message-censoring branch from 253f952 to 9a17cd0 Compare February 16, 2024 16:58
@kcharbo3
Copy link

LGTM! With regards to the todo comment, I believe we do still need that check in there because the transformer output is used to set the new SlPublicKeys - https://github.com/privacy-scaling-explorations/maci/blob/dev/circuits/circom/processMessages.circom#L651-L652

You could use the new voteOption check in processOne and then set the public keys based off that. Up to you though.

@ctrlc03 ctrlc03 force-pushed the fix/second-valid-message-censoring branch from 9a17cd0 to 8c56d25 Compare February 19, 2024 10:51
…currentVoteWeight

Prevent coordinator censoring a valid second message by passing the currentVoteWeight equal to a
value which would result in not enough voice credits in the circuit
@ctrlc03 ctrlc03 force-pushed the fix/second-valid-message-censoring branch from 8c56d25 to d747b06 Compare February 19, 2024 10:52
@ctrlc03
Copy link
Collaborator Author

ctrlc03 commented Feb 19, 2024

Closing this as it was merged in with #1170 - must have made a mistake while pushing latest changes to 1170. Will open a small PR to remove @todo and fix test loop condition

@ctrlc03 ctrlc03 closed this Feb 19, 2024
@ctrlc03 ctrlc03 deleted the fix/second-valid-message-censoring branch March 30, 2024 15:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

3 participants