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

RLN Relay #909

Closed
11 tasks
fryorcraken opened this issue Aug 25, 2022 · 1 comment
Closed
11 tasks

RLN Relay #909

fryorcraken opened this issue Aug 25, 2022 · 1 comment
Labels
enhancement New feature or request milestone Tracks a subteam milestone track:rln RLN Track (Secure Messaging/Applied ZK), e.g. relay and applications

Comments

@fryorcraken
Copy link
Collaborator

fryorcraken commented Aug 25, 2022

Meta issue: vacp2p/research#129

Breakdown

We want (1) , (2) and (3) for DevCon. Order on the other user stories in loose.

1. As a user, I want to join the group

  • Generate RLN credentials
    • Integrate zerokit in js-waku-rln
  • Call the contract to join the group
    • Using web wallet

2. As a user, I want to send a message that includes a proof

Would probably use Light Push (but does not really matter)

  • Retrieve state of group (must be latest to be secured)
    • Call contract (every time?)
    • Listen to contract events
  • Generate the proof using zerokit
  • Attach the proof to Waku Message
    • Need to design API/interface so messages are attached every time relay.send or lightpush.push is used.

3. As a end user, I want to use RLN in the web

  • Create rln-web-chat (clone web-chat)

4. As a rln-web-chat user, I want to my RLN credentials to be securely saved in the browser storage

  • This is a nice feature for web-chat users
  • Also an example for developers
  • See how eth-pm saves encryption key

5. As a rln-web-chat user, I want to be able to export and import my RLN credentials

Save as a file?
Maybe need to agree on format to be imported on chat2?

6. As a user, I want my node to check proofs on messages

The message could be received via store, filter or relay.

Note: This could be pass as a generalized "validation callback" method to filter and store. Maybe some helper to avoid too much code.

7. As a user, I want Waku Relay to check proofs on messages and drop them if invalid

Useful once Relay scalability #905 is ready.
Preferably use pubsub validator.

8. As a user, I want to be able to slash spammers

Review if slashing makes sense in the browser once #905 is progressed.

Other requirements

  • create js-rln repo under waku-org
  • Use Apache 2.0 - MIT Licence
  • Use similar tech stake than js-waku:
    • language: TypeScript
    • ESM Only package
    • package manager: npm or pnpm
    • Docs: Typedoc
    • TypeScript to JavaScript: tsc or parcel or vite
    • Bundling (to enable direct usage in <script> tag): rollup or vite
    • Format: prettier + eslint
    • Testing:
      • mocha/chai is used for js-waku, ok to consider more modern alternative, consider aegir
      • Browser run: karma, ok to consider better alternative or aegir (js-waku uses webpack for karma, best to try rollup or whichever bundler is used for prod code).
      • NodeJS: 16 or 18 (js-waku uses 16, tests can't run with 18 due to ESM loader changes, fine to use 18 and backport config fix to js-waku)
    • Dependencies: aim to use similar deps to js-waku for similar purposes (ie, noble, etc). Avoid polyfills.
@fryorcraken fryorcraken added the track:rln RLN Track (Secure Messaging/Applied ZK), e.g. relay and applications label Aug 25, 2022
@fryorcraken fryorcraken added this to Waku Aug 25, 2022
@fryorcraken fryorcraken added milestone Tracks a subteam milestone enhancement New feature or request labels Aug 25, 2022
@fryorcraken fryorcraken moved this to Todo in Waku Aug 25, 2022
@fryorcraken
Copy link
Collaborator Author

Transferred to waku-org/js-rln#1

Repository owner moved this from Todo to Done in Waku Aug 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request milestone Tracks a subteam milestone track:rln RLN Track (Secure Messaging/Applied ZK), e.g. relay and applications
Projects
Archived in project
Development

No branches or pull requests

1 participant