EYBlockchain / nightfall_3

a mono-repo containing an optimistic version of nightfall
Creative Commons Zero v1.0 Universal
263 stars 57 forks source link

Westlad/identify user #1413

Open Westlad opened 1 year ago

Westlad commented 1 year ago

What does this implement/fix? Explain your changes.

This code requires a User to prove to a Proposer that they hold a whitelisted Ethereum account. It is useful for cases where a Proposer wishes to show compliance with excluding non-whitelisted accounts. It is not strictly necessary because a non-whitelisted account cannot move funds into or out of Nightfall and therefore any transactions they may make within Nightfall are ultimately futile. However, this check provides extra assurance. It is entirely voluntary because there is no on-chain enforcement of the check. Proposers may disable the check, at their own risk, by setting the environment variable ANONYMOUS_USER.

What commands can I run to test the change?

This can be tested by running the normal test suite, whereby the check is enabled by default because ANONYMOUS_USER is not set.

Westlad commented 1 year ago

I'll add documentation of the anonymous user. This code is a branch off the PR you've mentioned, but I wanted to get that one in first, before merging this, because the other PR is a refactor whereas this adds new functionality.