Closed staheri14 closed 3 years ago
The following is the summary of how RLN works. This writeup combines the Semaphore paper and the RLN doc (some parts were missing in RLN doc which I have taken them from Semaphore). The local operations of each party for each phase as well as the exact data flows are described.
1. SetUp A membership contract on the blockchain with the following items in its state
MT
) of the registered users nullifier_map
signal_map
Peer (user)
a_0
as its identity2. Registration Peer
a_0
i.e., h(a_0)
together with a deposit to the membership contract and to obtain the insertion path auth_path
Membership Contract
h(a_0)
to MT
3. Signalling per epoch Peer
Inputs: (signal
, a_0
, auth_path
, epoch
)
To create a polynomial of degree 1 with the following coefficients
A_epoch(x)= a_0 + a_1 x
a_1= h (a_0, epoch)
Given the peer's signal
, the followings are submitted to the contract
signal
external_nullifier= epoch
internal_nullifier = h(a_1)
share_x = h(signal)
share_y = A_epoch(share_x)
proof
(proof
is generated using ZKSNARKs for some given circuit)Contract
proof
using the MT.root
internal_nullifier
in the nullifier_map
, if a duplicate is found for internal_nullifier
, perform slashing, otherwise, add the signal
to the signal_map
, and internal_nullifier
to the nullifier_map
MT.root
must be known by the verifiernullifier_map
must also be knownMT
and nullifier_map
auth_proof
always updated with the latest tree root (this requirement is still under discussion with the RLN group)The aim of the current issue was to make a preliminary study around the RLN technique before its integration into the relay protocol, since the integration idea has been figured out in the following PR https://github.com/vacp2p/specs/pull/254, I assume that the current issue can be closed after the PR approval. However, I can dedicate a separate spec for the description of RLN as well. @oskarth Please let me know if a separate spec is needed.
Problem
To map out the system model of the Rate limiting Nullifier using Semaphore (and any related studies). That includes
This issue is part of https://github.com/vacp2p/specs/issues/189
Acceptance criteria
All the items listed above must be clearly specified and documented.