mirror of https://github.com/vacp2p/rfc.git
413 lines
17 KiB
HTML
413 lines
17 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en" dir="ltr">
|
|
|
|
<head>
|
|
<meta name="generator" content="Hugo 0.106.0">
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<meta name="description" content="Abstract # This spec integrates Interep into the RLN spec. Interep is a group management protocol that allows for the creation of groups of users and the management of their membership. It is used to manage the membership of the RLN group.
|
|
Interep ties in web2 identities with reputation, and sorts the users into groups based on their reputation score. For example, a GitHub user with over 100 followers is considered to have “gold” reputation.">
|
|
<meta name="theme-color" content="#FFFFFF"><meta property="og:title" content="48/RLN-INTEREP-SPEC" />
|
|
<meta property="og:description" content="Abstract # This spec integrates Interep into the RLN spec. Interep is a group management protocol that allows for the creation of groups of users and the management of their membership. It is used to manage the membership of the RLN group.
|
|
Interep ties in web2 identities with reputation, and sorts the users into groups based on their reputation score. For example, a GitHub user with over 100 followers is considered to have “gold” reputation." />
|
|
<meta property="og:type" content="article" />
|
|
<meta property="og:url" content="https://rfc.vac.dev/spec/48/" /><meta property="article:section" content="docs" />
|
|
|
|
|
|
|
|
<title>48/RLN-INTEREP-SPEC | Vac RFC</title>
|
|
<link rel="manifest" href="/manifest.json">
|
|
<link rel="icon" href="/favicon.png" type="image/x-icon">
|
|
<link rel="stylesheet" href="/book.min.e935e20bd0d469378cb482f0958edf258c731a4f895dccd55799c6fbc8043f23.css" integrity="sha256-6TXiC9DUaTeMtILwlY7fJYxzGk+JXczVV5nG+8gEPyM=">
|
|
<script defer src="/en.search.min.5ded20501fd3debf92de0cd115de9de371f4bce78e8de5a9b2f50e06f822ce49.js" integrity="sha256-Xe0gUB/T3r+S3gzRFd6d43H0vOeOjeWpsvUOBvgizkk="></script>
|
|
<!--
|
|
Made with Book Theme
|
|
https://github.com/alex-shpak/hugo-book
|
|
-->
|
|
|
|
|
|
</head>
|
|
|
|
<body dir="ltr">
|
|
<input type="checkbox" class="hidden toggle" id="menu-control" />
|
|
<input type="checkbox" class="hidden toggle" id="toc-control" />
|
|
<main class="container flex">
|
|
<aside class="book-menu">
|
|
<div class="book-menu-content">
|
|
|
|
<nav>
|
|
<h2 class="book-brand">
|
|
<a href="/"><span>Vac RFC</span>
|
|
</a>
|
|
</h2>
|
|
|
|
|
|
<div class="book-search">
|
|
<input type="text" id="book-search-input" placeholder="Search" aria-label="Search" maxlength="64" data-hotkeys="s/" />
|
|
<div class="book-search-spinner hidden"></div>
|
|
<ul id="book-search-results"></ul>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<ul>
|
|
<li>Raw
|
|
<ul>
|
|
<li><a href="/spec/20/">20/TOY-ETH-PM</a></li>
|
|
<li><a href="/spec/24/">24/STATUS-CURATION</a></li>
|
|
<li><a href="/spec/28/">28/STATUS-FEATURING</a></li>
|
|
<li><a href="/spec/31/">31/WAKU2-ENR</a></li>
|
|
<li><a href="/spec/32/">32/RLN-V1</a></li>
|
|
<li><a href="/spec/34/">34/WAKU2-PEER-EXCHANGE</a></li>
|
|
<li><a href="/spec/35/">35/WAKU2-NOISE</a></li>
|
|
<li><a href="/spec/37/">37/WAKU2-NOISE-SESSIONS</a></li>
|
|
<li><a href="/spec/38/">38/CONSENSUS-CLARO</a></li>
|
|
<li><a href="/spec/43/">43/WAKU2-NOISE-PAIRING</a></li>
|
|
<li><a href="/spec/44/">44/WAKU2-DANDELION</a></li>
|
|
<li><a href="/spec/45/">45/WAKU2-ADVERSARIAL-MODELS</a></li>
|
|
<li><a href="/spec/46/">46/GOSSIPSUB-TOR-PUSH</a></li>
|
|
<li><a href="/spec/47/">47/WAKU2-TOR-PUSH</a></li>
|
|
<li><a href="/spec/48/"class=active>48/RLN-INTEREP-SPEC</a></li>
|
|
<li><a href="/spec/51/">51/WAKU2-RELAY-SHARDING</a></li>
|
|
<li><a href="/spec/52/">52/WAKU2-RELAY-STATIC-SHARD-ALLOC</a></li>
|
|
<li><a href="/spec/57/">57/STATUS-Simple-Scaling</a></li>
|
|
<li><a href="/spec/58/">58/RLN-V2</a></li>
|
|
<li><a href="/spec/61/">61/STATUS-Community-History-Archives</a></li>
|
|
<li><a href="/spec/63/">63/STATUS-Keycard-Usage</a></li>
|
|
<li><a href="/spec/64/">64/WAKU2-NETWORK</a></li>
|
|
</ul>
|
|
</li>
|
|
<li>Draft
|
|
<ul>
|
|
<li><a href="/spec/1/">1/COSS</a></li>
|
|
<li><a href="/spec/3/">3/REMOTE-LOG</a></li>
|
|
<li><a href="/spec/4/">4/MVDS-META</a></li>
|
|
<li><a href="/spec/10/">10/WAKU2</a></li>
|
|
<li><a href="/spec/12/">12/WAKU2-FILTER</a></li>
|
|
<li><a href="/spec/13/">13/WAKU2-STORE</a></li>
|
|
<li><a href="/spec/14/">14/WAKU2-MESSAGE</a></li>
|
|
<li><a href="/spec/15/">15/WAKU2-BRIDGE</a></li>
|
|
<li><a href="/spec/16/">16/WAKU2-RPC</a></li>
|
|
<li><a href="/spec/17/">17/WAKU2-RLN-RELAY</a></li>
|
|
<li><a href="/spec/18/">18/WAKU2-SWAP</a></li>
|
|
<li><a href="/spec/19/">19/WAKU2-LIGHTPUSH</a></li>
|
|
<li><a href="/spec/21/">21/WAKU2-FTSTORE</a></li>
|
|
<li><a href="/spec/22/">22/TOY-CHAT</a></li>
|
|
<li><a href="/spec/23/">23/WAKU2-TOPICS</a></li>
|
|
<li><a href="/spec/26/">26/WAKU2-PAYLOAD</a></li>
|
|
<li><a href="/spec/27/">27/WAKU2-PEERS</a></li>
|
|
<li><a href="/spec/29/">29/WAKU2-CONFIG</a></li>
|
|
<li><a href="/spec/30/">30/ADAPTIVE-NODES</a></li>
|
|
<li><a href="/spec/33/">33/WAKU2-DISCV5</a></li>
|
|
<li><a href="/spec/36/">36/WAKU2-BINDINGS-API</a></li>
|
|
<li><a href="/spec/53/">53/WAKU2-X3DH</a></li>
|
|
<li><a href="/spec/54/">54/WAKU2-X3DH-SESSIONS</a></li>
|
|
<li><a href="/spec/55/">55/STATUS-1TO1-CHAT</a></li>
|
|
<li><a href="/spec/56/">56/STATUS-COMMUNITIES</a></li>
|
|
</ul>
|
|
</li>
|
|
<li>Stable
|
|
<ul>
|
|
<li><a href="/spec/2/">2/MVDS</a></li>
|
|
<li><a href="/spec/6/">6/WAKU1</a></li>
|
|
<li><a href="/spec/7/">7/WAKU-DATA</a></li>
|
|
<li><a href="/spec/8/">8/WAKU-MAIL</a></li>
|
|
<li><a href="/spec/9/">9/WAKU-RPC</a></li>
|
|
<li><a href="/spec/11/">11/WAKU2-RELAY</a></li>
|
|
</ul>
|
|
</li>
|
|
<li>Deprecated
|
|
<ul>
|
|
<li><a href="/spec/5/">5/WAKU0</a></li>
|
|
</ul>
|
|
</li>
|
|
<li>Retired</li>
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</nav>
|
|
|
|
|
|
|
|
|
|
<script>(function(){var e=document.querySelector("aside.book-menu nav");addEventListener("beforeunload",function(){localStorage.setItem("menu.scrollTop",e.scrollTop)}),e.scrollTop=localStorage.getItem("menu.scrollTop")})()</script>
|
|
|
|
|
|
|
|
</div>
|
|
</aside>
|
|
|
|
<div class="book-page">
|
|
<header class="book-header">
|
|
|
|
<div class="flex align-center justify-between">
|
|
<label for="menu-control">
|
|
<img src="/svg/menu.svg" class="book-icon" alt="Menu" />
|
|
</label>
|
|
|
|
<strong>48/RLN-INTEREP-SPEC</strong>
|
|
|
|
<label for="toc-control">
|
|
|
|
<img src="/svg/toc.svg" class="book-icon" alt="Table of Contents" />
|
|
|
|
</label>
|
|
</div>
|
|
|
|
|
|
|
|
<aside class="hidden clearfix">
|
|
|
|
|
|
<nav id="TableOfContents">
|
|
<ul>
|
|
<li><a href="#abstract">Abstract</a></li>
|
|
<li><a href="#motivation">Motivation</a></li>
|
|
<li><a href="#functional-operation">Functional Operation</a>
|
|
<ul>
|
|
<li><a href="#1-generate-semaphore-credentials">1. Generate Semaphore credentials</a></li>
|
|
<li><a href="#2-verify-reputation-and-join-interep-group">2. Verify reputation and join Interep group</a></li>
|
|
<li><a href="#3-join-rln-membership-group">3. Join RLN membership group</a></li>
|
|
</ul>
|
|
</li>
|
|
<li><a href="#verification-of-messages">Verification of messages</a></li>
|
|
<li><a href="#slashing">Slashing</a></li>
|
|
<li><a href="#proof-of-concept">Proof of Concept</a></li>
|
|
<li><a href="#security-considerations">Security Considerations</a></li>
|
|
<li><a href="#references">References</a></li>
|
|
</ul>
|
|
</nav>
|
|
|
|
|
|
|
|
</aside>
|
|
|
|
|
|
</header>
|
|
|
|
|
|
|
|
<article class="markdown">
|
|
<h1 id="48rln-interep-spec">
|
|
48/RLN-INTEREP-SPEC
|
|
<a class="anchor" href="#48rln-interep-spec">#</a>
|
|
</h1>
|
|
|
|
|
|
<h1 id="interep-as-group-management-for-rln">
|
|
Interep as group management for RLN
|
|
<a class="anchor" href="#interep-as-group-management-for-rln">#</a>
|
|
</h1>
|
|
|
|
|
|
|
|
|
|
<img src="https://img.shields.io/badge/status-raw-lightgrey?style=flat-square" />
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<ul>
|
|
<li>Status: raw</li>
|
|
<li>Editor: Aaryamann Challani <a href="mailto:aaryamann@status.im">aaryamann@status.im</a></li>
|
|
|
|
</ul><h1 id="abstract">
|
|
Abstract
|
|
<a class="anchor" href="#abstract">#</a>
|
|
</h1>
|
|
<p>This spec integrates <a href="https://interep.link">Interep</a> into the <a href="https://rlnp2p.vac.dev/">RLN</a> spec.
|
|
Interep is a group management protocol that allows for the creation of groups of users and the management of their membership.
|
|
It is used to manage the membership of the RLN group.</p>
|
|
<p>Interep ties in web2 identities with reputation, and sorts the users into groups based on their reputation score.
|
|
For example, a GitHub user with over 100 followers is considered to have “gold” reputation.</p>
|
|
<p>Interep uses <a href="https://semaphore.appliedzkp.org/">Semaphore</a> under the hood to allow anonymous signaling of membership in a group.
|
|
Therefore, a user with a “gold” reputation can prove the existence of their membership without revealing their identity.</p>
|
|
<p>RLN is used for spam prevention, and Interep is used for group management.</p>
|
|
<p>By using Interep with RLN, we allow users to join RLN membership groups without the need for on-chain financial stake.</p>
|
|
<h1 id="motivation">
|
|
Motivation
|
|
<a class="anchor" href="#motivation">#</a>
|
|
</h1>
|
|
<p>To have Sybil-Resistant group management, there are <a href="https://github.com/vacp2p/rln-contract">implementations</a> of RLN which make use of financial stake on-chain.
|
|
However, this is not ideal because it reduces the barrier of entry for honest participants.</p>
|
|
<p>In this case, honest participants will most likely have a web2 identity accessible to them, which can be used for joining an Interep reputation group.
|
|
By modifying the RLN spec to use Interep, we can have Sybil-Resistant group management without the need for on-chain financial stake.</p>
|
|
<p>Since RLN and Interep both use Semaphore-style credentials, it is possible to use the same set of credentials for both.</p>
|
|
<h1 id="functional-operation">
|
|
Functional Operation
|
|
<a class="anchor" href="#functional-operation">#</a>
|
|
</h1>
|
|
<p>Using Interep with RLN involves the following steps -</p>
|
|
<ol>
|
|
<li>Generate Semaphore credentials</li>
|
|
<li>Verify reputation and join Interep group</li>
|
|
<li>Join RLN membership group via interaction with Smart Contract, by passing a proof of membership to the Interep group</li>
|
|
</ol>
|
|
<h2 id="1-generate-semaphore-credentials">
|
|
1. Generate Semaphore credentials
|
|
<a class="anchor" href="#1-generate-semaphore-credentials">#</a>
|
|
</h2>
|
|
<p>Semaphore credentials are generated in a standard way, depicted in the <a href="https://semaphore.appliedzkp.org/docs/guides/identities#create-deterministic-identities">Semaphore documentation</a>.</p>
|
|
<h2 id="2-verify-reputation-and-join-interep-group">
|
|
2. Verify reputation and join Interep group
|
|
<a class="anchor" href="#2-verify-reputation-and-join-interep-group">#</a>
|
|
</h2>
|
|
<p>Using the Interep app deployed on <a href="https://goerli.interep.link/">Goerli</a>, the user can check their reputation tier and join the corresponding group.
|
|
This results in a transaction to the Interep contract, which adds them to the group.</p>
|
|
<h2 id="3-join-rln-membership-group">
|
|
3. Join RLN membership group
|
|
<a class="anchor" href="#3-join-rln-membership-group">#</a>
|
|
</h2>
|
|
<p>Instead of sending funds to the RLN contract to join the membership group, the user can send a proof of membership to the Interep group.
|
|
This proof is generated by the user, and is verified by the contract.
|
|
The contract ensures that the user is a member of the Interep group, and then adds them to the RLN membership group.</p>
|
|
<p>Following is the modified signature of the register function in the RLN contract -</p>
|
|
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-solidity" data-lang="solidity"><span style="display:flex;"><span> <span style="color:#75715e">/// @param groupId: Id of the group.
|
|
</span></span></span><span style="display:flex;"><span><span style="color:#75715e"></span> <span style="color:#75715e">/// @param signal: Semaphore signal.
|
|
</span></span></span><span style="display:flex;"><span><span style="color:#75715e"></span> <span style="color:#75715e">/// @param nullifierHash: Nullifier hash.
|
|
</span></span></span><span style="display:flex;"><span><span style="color:#75715e"></span> <span style="color:#75715e">/// @param externalNullifier: External nullifier.
|
|
</span></span></span><span style="display:flex;"><span><span style="color:#75715e"></span> <span style="color:#75715e">/// @param proof: Zero-knowledge proof.
|
|
</span></span></span><span style="display:flex;"><span><span style="color:#75715e"></span> <span style="color:#75715e">/// @param idCommitment: ID Commitment of the member.
|
|
</span></span></span><span style="display:flex;"><span><span style="color:#75715e"></span> <span style="color:#66d9ef">function</span> <span style="color:#a6e22e">register</span>(
|
|
</span></span><span style="display:flex;"><span> <span style="color:#66d9ef">uint256</span> groupId,
|
|
</span></span><span style="display:flex;"><span> <span style="color:#66d9ef">bytes32</span> signal,
|
|
</span></span><span style="display:flex;"><span> <span style="color:#66d9ef">uint256</span> nullifierHash,
|
|
</span></span><span style="display:flex;"><span> <span style="color:#66d9ef">uint256</span> externalNullifier,
|
|
</span></span><span style="display:flex;"><span> <span style="color:#66d9ef">uint256</span>[<span style="color:#ae81ff">8</span>] calldata proof,
|
|
</span></span><span style="display:flex;"><span> <span style="color:#66d9ef">uint256</span> idCommitment
|
|
</span></span><span style="display:flex;"><span> )
|
|
</span></span></code></pre></div><h1 id="verification-of-messages">
|
|
Verification of messages
|
|
<a class="anchor" href="#verification-of-messages">#</a>
|
|
</h1>
|
|
<p>Messages are verified the same way as in the <a href="https://rfc.vac.dev/spec/32/#verification">RLN spec</a>.</p>
|
|
<h1 id="slashing">
|
|
Slashing
|
|
<a class="anchor" href="#slashing">#</a>
|
|
</h1>
|
|
<p>The slashing mechanism is the same as in the <a href="https://rfc.vac.dev/spec/32/#slashing">RLN spec</a>.
|
|
It is important to note that the slashing may not have the intended effect on the user, since the only consequence is that they cannot send messages.
|
|
This is due to the fact that the user can send a identity commitment in the registration to the RLN contract, which is different than the one used in the Interep group.</p>
|
|
<h1 id="proof-of-concept">
|
|
Proof of Concept
|
|
<a class="anchor" href="#proof-of-concept">#</a>
|
|
</h1>
|
|
<p>A proof of concept is available at <a href="https://github.com/vacp2p/rln-interep-contract">vacp2p/rln-interp-contract</a> which integrates Interep with RLN.</p>
|
|
<h1 id="security-considerations">
|
|
Security Considerations
|
|
<a class="anchor" href="#security-considerations">#</a>
|
|
</h1>
|
|
<ol>
|
|
<li>As mentioned in <a href="#slashing">Slashing</a>, the slashing mechanism may not have the intended effect on the user.</li>
|
|
<li>This spec inherits the security considerations of the <a href="https://rfc.vac.dev/spec/32/#security-considerations">RLN spec</a>.</li>
|
|
<li>This spec inherits the security considerations of <a href="https://docs.interep.link/">Interep</a>.</li>
|
|
<li>A user may make multiple registrations using the same Interep proofs but different identity commitments. The way to mitigate this is to check if the nullifier hash has been detected previously in proof verification.</li>
|
|
</ol>
|
|
<h1 id="references">
|
|
References
|
|
<a class="anchor" href="#references">#</a>
|
|
</h1>
|
|
<ol>
|
|
<li><a href="https://rfc.vac.dev/spec/32/">RLN spec</a></li>
|
|
<li><a href="https://interep.link">Interep</a></li>
|
|
<li><a href="https://semaphore.appliedzkp.org/">Semaphore</a></li>
|
|
<li><a href="https://ethresear.ch/t/decentralised-cloudflare-using-rln-and-rich-user-identities/10774">Decentralized cloudflare using Interep</a></li>
|
|
<li><a href="https://github.com/interep-project/contracts">Interep contracts</a></li>
|
|
<li><a href="https://github.com/vacp2p/rln-contract">RLN contract</a></li>
|
|
<li><a href="https://rlnp2p.vac.dev/">RLNP2P</a></li>
|
|
</ol>
|
|
</article>
|
|
|
|
|
|
|
|
<footer class="book-footer">
|
|
|
|
<div class="flex flex-wrap justify-between">
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</footer>
|
|
|
|
|
|
|
|
<div class="book-comments">
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<label for="menu-control" class="hidden book-menu-overlay"></label>
|
|
</div>
|
|
|
|
|
|
<aside class="book-toc">
|
|
<div class="book-toc-content">
|
|
|
|
|
|
<nav id="TableOfContents">
|
|
<ul>
|
|
<li><a href="#abstract">Abstract</a></li>
|
|
<li><a href="#motivation">Motivation</a></li>
|
|
<li><a href="#functional-operation">Functional Operation</a>
|
|
<ul>
|
|
<li><a href="#1-generate-semaphore-credentials">1. Generate Semaphore credentials</a></li>
|
|
<li><a href="#2-verify-reputation-and-join-interep-group">2. Verify reputation and join Interep group</a></li>
|
|
<li><a href="#3-join-rln-membership-group">3. Join RLN membership group</a></li>
|
|
</ul>
|
|
</li>
|
|
<li><a href="#verification-of-messages">Verification of messages</a></li>
|
|
<li><a href="#slashing">Slashing</a></li>
|
|
<li><a href="#proof-of-concept">Proof of Concept</a></li>
|
|
<li><a href="#security-considerations">Security Considerations</a></li>
|
|
<li><a href="#references">References</a></li>
|
|
</ul>
|
|
</nav>
|
|
|
|
|
|
|
|
</div>
|
|
</aside>
|
|
|
|
</main>
|
|
|
|
|
|
</body>
|
|
|
|
</html>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|