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

implement canon addr sig check circuit, verifier, sdk wrapper #433

Merged
merged 10 commits into from
Sep 5, 2023

Conversation

Sladuca
Copy link
Contributor

@Sladuca Sladuca commented Sep 4, 2023

Motivation

Want to prevent people from registering false mappings between ethereum addresses and nocturne canonical addresses in the address registry

Solution

  • add a circuit called CanonAddrSigCheck through which client proves they know spend key corresponding to claimed canonical address
  • add contract unit test, SDK types, local prover wasm impl, and helper fn in frontend sdk

Proof

https://www.loom.com/share/6f0137f7410e4e968ce09dbff6fa5651?sid=d4217b60-9beb-473c-8bb0-bea591d40f6a

PR Checklist

  • added tests
  • updated documentation
  • added changeset if necessary
  • tested in dev/testnet
  • tested site with snap (we haven't automated this yet)
  • re-built & tested circuits if any of them changed
  • updated contracts storage layout (if contracts were updated)

@changeset-bot
Copy link

changeset-bot bot commented Sep 4, 2023

🦋 Changeset detected

Latest commit: c4d03f3

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 13 packages
Name Type
@nocturne-xyz/contracts Patch
@nocturne-xyz/snap Patch
@nocturne-xyz/frontend-sdk Patch
@nocturne-xyz/local-prover Patch
@nocturne-xyz/core Patch
@nocturne-xyz/circuits Patch
@nocturne-xyz/deploy Patch
@nocturne-xyz/bundler Patch
@nocturne-xyz/deposit-screener Patch
@nocturne-xyz/subtree-updater Patch
@nocturne-xyz/test-actor Patch
@nocturne-xyz/idb-kv-store Patch
@nocturne-xyz/persistent-log Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Contributor Author

Sladuca commented Sep 4, 2023

Current dependencies on/for this PR:

This comment was auto-generated by Graphite.

@Sladuca Sladuca force-pushed the seb/canon-addr-ownership-circuit branch from fbab3c4 to 401848f Compare September 4, 2023 19:18
@Sladuca Sladuca marked this pull request as ready for review September 4, 2023 19:31
@Sladuca Sladuca force-pushed the seb/canon-addr-ownership-circuit branch from 0a6ba02 to 7e9cd19 Compare September 5, 2023 15:52
Copy link
Contributor

@luketchang luketchang left a comment

Choose a reason for hiding this comment

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

Lgtm to me, there is one comment in circuit though that is misleading and should be fixed

signal input nonceAndSignBit;

// *** WITNESS ***
// signature on fixed message used to prove knowledge of viewing key
Copy link
Contributor

Choose a reason for hiding this comment

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

This should say knowledge of spending key not viewing key

@Sladuca Sladuca enabled auto-merge (squash) September 5, 2023 20:53
@Sladuca Sladuca merged commit 589e023 into main Sep 5, 2023
2 checks passed
@Sladuca Sladuca deleted the seb/canon-addr-ownership-circuit branch September 5, 2023 21:25
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.

2 participants