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

tests(key-change): add tests and docs related to MACI's key change #885

Merged
merged 1 commit into from
Dec 12, 2023

Conversation

ctrlc03
Copy link
Collaborator

@ctrlc03 ctrlc03 commented Dec 7, 2023

Currently, it is not clear how the key change mechanism works (or doesn't), hence this PR aims to provide some clarification on this front, by adding docs and test cases.

This is in reference to this: #717

Copy link

netlify bot commented Dec 7, 2023

Deploy Preview for maci-typedoc ready!

Name Link
🔨 Latest commit ce394e2
🔍 Latest deploy log https://app.netlify.com/sites/maci-typedoc/deploys/65784b726c6a21000835899a
😎 Deploy Preview https://deploy-preview-885--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 Dec 7, 2023
@baumstern
Copy link
Member

Super cool. It's much needed.

@ctrlc03 ctrlc03 force-pushed the tests/key-change branch 3 times, most recently from dea1c25 to ccef119 Compare December 10, 2023 17:42
@ctrlc03 ctrlc03 marked this pull request as ready for review December 10, 2023 18:44
Copy link
Member

@baumstern baumstern left a comment

Choose a reason for hiding this comment

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

Great work! Just left a nit

VOTE_OPTION_TREE_DEPTH,
coordinatorPubKey,
);
stateIndex = parseInt(await signup(keypair1.pubKey.serialize()));
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
stateIndex = parseInt(await signup(keypair1.pubKey.serialize()));
stateIndex = await signup(keypair1.pubKey.serialize());

nit: it's better to return number type from signup()

Copy link
Collaborator Author

@ctrlc03 ctrlc03 Dec 12, 2023

Choose a reason for hiding this comment

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

@baumstern Can you please dismiss your change request as this is something not related to this PR? will amend in another PR

const pollId = 0;
let stateIndex = 0;
const expectedTally = initialVoteAmount - 1;
const expectedPerVOteOptionTally = (initialVoteAmount - 1) ** 2;
Copy link
Collaborator

Choose a reason for hiding this comment

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

I wanna ask why is expectedPerVOteOptionTally except for expectedPerVoteOptionTally?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Could you please rephrase that? I'm afraid I didn't get it

Copy link
Collaborator

Choose a reason for hiding this comment

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

oh just wanna ask why the character 'o' is capitalized XD

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

ohh it's a typo 😆

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

fixed :)

@baumstern baumstern self-requested a review December 12, 2023 10:03
@ctrlc03 ctrlc03 merged commit 179657e into dev Dec 12, 2023
12 checks passed
@ctrlc03 ctrlc03 deleted the tests/key-change branch December 12, 2023 12:57
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.

3 participants