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

test(contracts): check the NOTHING_UP_MY_SLEEVE value in Poll test suite #1972

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

wildanvin
Copy link
Contributor

Description

This PR checks the value of the NOTHING_UP_MY_SLEEVE in the Poll test suite

Additional Notes

Hello :)

I am not entirely sure if this is the right approach to fix this issue but i figured the making the PR will be a good place to start. Please let me know what do you think. Any guidance will be appreciated for sure.

Related issue(s)

Fix #1153

Confirmation

Copy link

vercel bot commented Dec 16, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
maci-website ✅ Ready (Inspect) Visit Preview Dec 16, 2024 2:45am

@ctrlc03
Copy link
Collaborator

ctrlc03 commented Dec 21, 2024

@wildanvin thanks for opening this PR.

Right so the idea is that inside the smart contracts, we always init the message tree (or hash chain now) with this NOTHING_UP_MY_SLEEVE value (https://github.com/privacy-scaling-explorations/maci/blob/dev/packages/contracts/contracts/Poll.sol#L201) - However I'm giving it some more thought atm and think this issue could even just be closed as all e2e/integration tests do include that value, it would only be some unit tests

Comment on lines +95 to +97
expect(
NOTHING_UP_MY_SLEEVE === BigInt("8370432830353022751713833565135785980866757267633941821328460903436894336785"),
);
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm not sure if I makes sense to check the constant value in tests.
I think the idea is to check this value is inside the tree. Checking the constant value doesn't give any coverage.

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.

unit tests do not account for NOTHING_UP_MY_SLEEVE
3 participants