vacp2p / research

Thinking in code
MIT License
62 stars 4 forks source link

Rln Relay: concerns and considerations #55

Closed staheri14 closed 3 years ago

staheri14 commented 3 years ago

In the current issue, we summarize the potential performance and cost issues about the current implementation of rln-relay.

Overview

rln-relay consists of the following steps: 1- A membership smart contract must be deployed on the blockchain, the contract holds the list of current registered members (as well as deleted members) and has the API for member insertion, and deletion (slashing). Root of the tree and auth path of pubkeys are not available as part of the contract.

2- Each rln-relay enabled peer must register a public key through the smart contract. Peers need to persistently store their public and secret keys. Registered peer locks a certain amount of fund in the smart contract, which gets burned in case the peer misbehaves (spams the system). 3- Each rln-relay enabled peer must construct and maintain a Merkle Tree based on the list of current members )fetched from the membership contract). This is required for the spam protection. As scuh, peers must keep listening to the contract events (member insertion or deletion) and update their local Merkle tree accordingly. Having the Merkle tree, a peer is able to

4- By having access to the recent root and membership proof