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

shared secret #237

Merged
merged 26 commits into from
Jun 19, 2024
Merged

shared secret #237

merged 26 commits into from
Jun 19, 2024

Conversation

SwatiEY
Copy link
Contributor

@SwatiEY SwatiEY commented Apr 4, 2024

This PR adds a decorator sharedSecret, and the corresponding api to get the shared keys. If a state is marked as sharedSecret implies that can be state variable is shared between two parties, thus can be nullified by both of them.

@SwatiEY SwatiEY self-assigned this Apr 4, 2024
@SwatiEY SwatiEY requested review from lydiagarms and kKahina April 4, 2024 08:28
@SwatiEY SwatiEY closed this Apr 4, 2024
@SwatiEY SwatiEY reopened this Apr 4, 2024
@SwatiEY SwatiEY changed the base branch from master to swati/imports April 10, 2024 08:49
@SwatiEY SwatiEY changed the base branch from swati/imports to master April 11, 2024 15:34
@@ -2,7 +2,7 @@

// Q: how are we merging mapping key and ownerPK in edge case?
// Q: should we reduce constraints a mapping's commitment's preimage by not having the extra inner hash? Not at the moment, because it adds complexity to transpilation.
import fs from 'fs';
import fs, { stat } from 'fs';
Copy link
Contributor

Choose a reason for hiding this comment

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

{stat} where stat is used ?

// For a state variable, we'll have passed in `${x}_oldCommitment_value` as a parameter. But our AST nodes will be using `${x}`. This line resolves the two.
if (reinitialisable)
return [ `${typeName ? typeName : 'field'} ${x} = 0`];
Copy link
Contributor

Choose a reason for hiding this comment

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

${x}=0, because commitment are not nullified ?

test/contracts/Swap.zol Outdated Show resolved Hide resolved
Copy link
Contributor

Choose a reason for hiding this comment

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

Is the containsAccessedOnlyStates relevant to this pull request?

Copy link
Contributor

Choose a reason for hiding this comment

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

Is line 63 one of the nullifier changes?

Copy link
Contributor

Choose a reason for hiding this comment

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

Are the changes on line 110 and lines 139-141 related to this pull request or are they from when the nullifier checking was being changed?

@SwatiEY SwatiEY merged commit 1823daf into master Jun 19, 2024
2 checks passed
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