Files
research.logos.co/assets/js/8779ed83.7298f8c7.js
2026-02-13 14:54:16 +00:00

1 line
57 KiB
JavaScript

"use strict";(self.webpackChunkresearch_logos_co=self.webpackChunkresearch_logos_co||[]).push([[9284],{2937:(s,e,a)=>{a.d(e,{A:()=>n});const n=a.p+"assets/images/rln_dep_tree-0bf1837513daecde1a3de4deb9a8855f.jpg"},26203:(s,e,a)=>{a.d(e,{A:()=>n});const n=a.p+"assets/images/spam_prevention_in_action-50221f227e3d94be5aeae45193cc04ea.png"},28453:(s,e,a)=>{a.d(e,{R:()=>r,x:()=>t});var n=a(96540);const i={},l=n.createContext(i);function r(s){const e=n.useContext(l);return n.useMemo((function(){return"function"==typeof s?s(e):{...e,...s}}),[e,s])}function t(s){let e;return e=s.disableParentContext?"function"==typeof s.components?s.components(i):s.components||i:r(s.components),n.createElement(l.Provider,{value:e},s.children)}},41801:s=>{s.exports=JSON.parse('{"permalink":"/rlog/rln-anonymous-dos-prevention","source":"@site/rlog/2023-11-07-rln-relay.mdx","title":"Strengthening Anonymous DoS Prevention with Rate Limiting Nullifiers in Waku","description":"Rate Limiting Nullifiers in practice, applied to an anonymous p2p network, like Waku.","date":"2023-11-07T12:00:00.000Z","tags":[],"readingTime":6.78,"hasTruncateMarker":true,"authors":[{"name":"Aaryamann","twitter":"p1ge0nh8er","github":"rymnc","key":"p1ge0nh8er","page":null}],"frontMatter":{"title":"Strengthening Anonymous DoS Prevention with Rate Limiting Nullifiers in Waku","date":"2023-11-07T12:00:00.000Z","authors":"p1ge0nh8er","published":true,"slug":"rln-anonymous-dos-prevention","categories":"research","toc_min_heading_level":2,"toc_max_heading_level":4},"unlisted":false,"prevItem":{"title":"Verifying RLN Proofs in Light Clients with Subtrees","permalink":"/rlog/rln-light-verifiers"},"nextItem":{"title":"GossipSub Improvements: Evolution of Overlay Design and Message Dissemination in Unstructured P2P Networks","permalink":"/rlog/GossipSub Improvements"}}')},56699:(s,e,a)=>{a.d(e,{A:()=>n});const n=a.p+"assets/images/proof_generation_time-195632e4864fa4c5f883895f2ea9e9e3.png"},64735:(s,e,a)=>{a.r(e),a.d(e,{assets:()=>m,contentTitle:()=>t,default:()=>d,frontMatter:()=>r,metadata:()=>n,toc:()=>c});var n=a(41801),i=a(74848),l=a(28453);const r={title:"Strengthening Anonymous DoS Prevention with Rate Limiting Nullifiers in Waku",date:new Date("2023-11-07T12:00:00.000Z"),authors:"p1ge0nh8er",published:!0,slug:"rln-anonymous-dos-prevention",categories:"research",toc_min_heading_level:2,toc_max_heading_level:4},t=void 0,m={authorsImageUrls:[void 0]},c=[{value:"Introduction",id:"introduction",level:2},{value:"RLN Protocol parameters",id:"rln-protocol-parameters",level:2},{value:"Malicious User secret interpolation mechanism",id:"malicious-user-secret-interpolation-mechanism",level:2},{value:"Waku's problem with DoS",id:"wakus-problem-with-dos",level:2},{value:"DoS prevention with user metadata",id:"dos-prevention-with-user-metadata",level:3},{value:"Performance analysis",id:"performance-analysis",level:2},{value:"Security analysis",id:"security-analysis",level:2},{value:"Storage analysis",id:"storage-analysis",level:2},{value:"The bare minimum requirements to run RLN",id:"the-bare-minimum-requirements-to-run-rln",level:2},{value:"RLN usage guide",id:"rln-usage-guide",level:2},{value:"Future work",id:"future-work",level:2},{value:"References",id:"references",level:2}];function h(s){const e={a:"a",annotation:"annotation",blockquote:"blockquote",code:"code",em:"em",h2:"h2",h3:"h3",img:"img",li:"li",math:"math",mfrac:"mfrac",mi:"mi",mn:"mn",mo:"mo",mrow:"mrow",mspace:"mspace",msub:"msub",msup:"msup",mtext:"mtext",ol:"ol",p:"p",pre:"pre",semantics:"semantics",span:"span",ul:"ul",...(0,l.R)(),...s.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(e.p,{children:"Rate Limiting Nullifiers in practice, applied to an anonymous p2p network, like Waku."}),"\n","\n",(0,i.jsx)(e.h2,{id:"introduction",children:"Introduction"}),"\n",(0,i.jsx)(e.p,{children:"Rate Limiting Nullifier (RLN) is a zero-knowledge gadget that allows users to prove 2 pieces of information,"}),"\n",(0,i.jsxs)(e.ol,{children:["\n",(0,i.jsx)(e.li,{children:"They belong to a permissioned membership set"}),"\n",(0,i.jsx)(e.li,{children:"Their rate of signaling abides by a fixed number that has been previously declared"}),"\n"]}),"\n",(0,i.jsx)(e.p,{children:'The "membership set" introduced above, is in the form of a sparse, indexed merkle tree.\nThis membership set can be maintained on-chain, off-chain or as a hybrid depending on the network\'s storage costs.\nWaku makes use of a hybrid membership set,\nwhere insertions are tracked in a smart contract.\nIn addition, each Waku node maintains a local copy of the tree,\nwhich is updated upon each insertion.'}),"\n",(0,i.jsxs)(e.p,{children:["Users register themselves with a hash of a locally generated secret,\nwhich is then inserted into the tree at the next available index.\nAfter having registered, users can prove their membership by proving their knowledge of the pre-image of the respective leaf in the tree.\nThe leaf hashes are also referred to as commitments of the respective users.\nThe actual proof is done by a ",(0,i.jsx)(e.a,{href:"https://ethereum.org/en/developers/tutorials/merkle-proofs-for-offline-data-integrity/",children:"Merkle Inclusion Proof"}),", which is a type of ZK proof."]}),"\n",(0,i.jsx)(e.p,{children:"The circuit ensures that the user's secret does indeed hash to a leaf in the tree,\nand that the provided Merkle proof is valid."}),"\n",(0,i.jsx)(e.p,{children:"After a User generates this Merkle proof,\nthey can transmit it to other users,\nwho can verify the proof.\nIncluding a message's hash within the proof generation,\nadditionally guarantees integrity of that message."}),"\n",(0,i.jsxs)(e.p,{children:["A malicious user could generate multiple proofs per epoch.\nthey generate multiple proofs per epoch.\nHowever, when multiple proofs are generated per epoch,\nthe malicious user's secret is exposed, which strongly disincentivizes this attack.\nThis mechanism is further described in ",(0,i.jsx)(e.a,{href:"#malicious-user-secret-interpolation-mechanism",children:"malicious User secret interpolation mechanism"})]}),"\n",(0,i.jsx)(e.p,{children:"Note: This blog post describes rln-v1, which excludes the range check in favor of a global rate limit for all users,\nwhich is once per time window. This version is currently in use in waku-rln-relay."}),"\n",(0,i.jsx)(e.h2,{id:"rln-protocol-parameters",children:"RLN Protocol parameters"}),"\n",(0,i.jsx)(e.p,{children:"Given below is the set of cryptographic primitives,\nand constants that are used in the RLN protocol."}),"\n",(0,i.jsxs)(e.ol,{children:["\n",(0,i.jsxs)(e.li,{children:["Proving System: ",(0,i.jsx)(e.a,{href:"https://eprint.iacr.org/2016/260.pdf",children:(0,i.jsx)(e.code,{children:"groth16"})})]}),"\n",(0,i.jsxs)(e.li,{children:["Elliptic Curve: ",(0,i.jsx)(e.a,{href:"https://eprint.iacr.org/2013/879.pdf",children:(0,i.jsx)(e.code,{children:"bn254"})})," (aka bn128) (not to be confused with the 254 bit Weierstrass curve)"]}),"\n",(0,i.jsxs)(e.li,{children:["Finite Field: Prime-order subgroup of the group of points on the ",(0,i.jsx)(e.code,{children:"bn254"})," curve"]}),"\n",(0,i.jsxs)(e.li,{children:["Default Merkle Tree Height: ",(0,i.jsx)(e.code,{children:"20"})]}),"\n",(0,i.jsxs)(e.li,{children:["Hashing algorithm: ",(0,i.jsx)(e.a,{href:"https://eprint.iacr.org/2019/458.pdf",children:(0,i.jsx)(e.code,{children:"Poseidon"})})]}),"\n",(0,i.jsxs)(e.li,{children:["Merkle Tree: ",(0,i.jsx)(e.a,{href:"https://github.com/rate-limiting-nullifier/pmtree",children:(0,i.jsx)(e.code,{children:"Sparse Indexed Merkle Tree"})})]}),"\n",(0,i.jsxs)(e.li,{children:["Messages per epoch: ",(0,i.jsx)(e.code,{children:"1"})]}),"\n",(0,i.jsxs)(e.li,{children:["Epoch duration: ",(0,i.jsx)(e.code,{children:"10 seconds"})]}),"\n"]}),"\n",(0,i.jsx)(e.h2,{id:"malicious-user-secret-interpolation-mechanism",children:"Malicious User secret interpolation mechanism"}),"\n",(0,i.jsxs)(e.blockquote,{children:["\n",(0,i.jsx)(e.p,{children:"note: all the parameters mentioned below are elements in the finite field mentioned above."}),"\n"]}),"\n",(0,i.jsx)(e.p,{children:"The private inputs to the circuit are as follows: -"}),"\n",(0,i.jsx)(e.pre,{children:(0,i.jsx)(e.code,{children:"identitySecret: the randomly generated secret of the user\nidentityPathIndex: the index of the commitment derived from the secret\npathElements: elements included in the path to the index of the commitment\n"})}),"\n",(0,i.jsx)(e.p,{children:"Following are the public inputs to the circuit -"}),"\n",(0,i.jsx)(e.pre,{children:(0,i.jsx)(e.code,{children:"x: hash of the signal to the finite field\nrlnIdentifier: application-specific identifier which this proof is being generated for\nepoch: the timestamp which this proof is being generated for\n"})}),"\n",(0,i.jsx)(e.p,{children:"The outputs of the circuit are as follows: -"}),"\n",(0,i.jsx)(e.pre,{children:(0,i.jsx)(e.code,{children:"y: result of Shamir's secret sharing calculation\nroot: root of the Merkle tree obtained after applying the inclusion proof\nnullifier: uniquely identifies a message, derived from rlnIdentifier, epoch, and the user's secret\n"})}),"\n",(0,i.jsx)(e.p,{children:"With the above data in mind, following is the circuit pseudocode -"}),"\n",(0,i.jsx)(e.pre,{children:(0,i.jsx)(e.code,{children:"identityCommitment = Poseidon([identitySecret])\nroot = MerkleInclusionProof(identityCommitment, identityPathIndex, pathElements)\nexternalNullifier = Poseidon([epoch, rlnIdentifier])\na1 = Poseidon([identitySecret, externalNullifier])\ny = identitySecret + a1 * x\nnullifier = Poseidon([a1])\n"})}),"\n",(0,i.jsx)(e.p,{children:"To interpolate the secret of a user who has sent multiple signals during the same epoch to the same rln-based application, we may make use of the following formula -"}),"\n",(0,i.jsx)(e.p,{children:(0,i.jsxs)(e.span,{className:"katex",children:[(0,i.jsx)(e.span,{className:"katex-mathml",children:(0,i.jsx)(e.math,{xmlns:"http://www.w3.org/1998/Math/MathML",children:(0,i.jsxs)(e.semantics,{children:[(0,i.jsxs)(e.mrow,{children:[(0,i.jsxs)(e.msub,{children:[(0,i.jsx)(e.mi,{children:"a"}),(0,i.jsx)(e.mn,{children:"1"})]}),(0,i.jsx)(e.mo,{children:"="}),(0,i.jsxs)(e.mfrac,{children:[(0,i.jsxs)(e.mrow,{children:[(0,i.jsx)(e.mo,{stretchy:"false",children:"("}),(0,i.jsxs)(e.msub,{children:[(0,i.jsx)(e.mi,{children:"y"}),(0,i.jsx)(e.mn,{children:"1"})]}),(0,i.jsx)(e.mo,{children:"\u2212"}),(0,i.jsxs)(e.msub,{children:[(0,i.jsx)(e.mi,{children:"y"}),(0,i.jsx)(e.mn,{children:"2"})]}),(0,i.jsx)(e.mo,{stretchy:"false",children:")"})]}),(0,i.jsxs)(e.mrow,{children:[(0,i.jsx)(e.mo,{stretchy:"false",children:"("}),(0,i.jsxs)(e.msub,{children:[(0,i.jsx)(e.mi,{children:"x"}),(0,i.jsx)(e.mn,{children:"1"})]}),(0,i.jsx)(e.mo,{children:"\u2212"}),(0,i.jsxs)(e.msub,{children:[(0,i.jsx)(e.mi,{children:"x"}),(0,i.jsx)(e.mn,{children:"2"})]}),(0,i.jsx)(e.mo,{stretchy:"false",children:")"})]})]})]}),(0,i.jsx)(e.annotation,{encoding:"application/x-tex",children:"a_1 = {(y_1 - y_2) \\over (x_1 - x_2)}"})]})})}),(0,i.jsxs)(e.span,{className:"katex-html","aria-hidden":"true",children:[(0,i.jsxs)(e.span,{className:"base",children:[(0,i.jsx)(e.span,{className:"strut",style:{height:"0.5806em",verticalAlign:"-0.15em"}}),(0,i.jsxs)(e.span,{className:"mord",children:[(0,i.jsx)(e.span,{className:"mord mathnormal",children:"a"}),(0,i.jsx)(e.span,{className:"msupsub",children:(0,i.jsxs)(e.span,{className:"vlist-t vlist-t2",children:[(0,i.jsxs)(e.span,{className:"vlist-r",children:[(0,i.jsx)(e.span,{className:"vlist",style:{height:"0.3011em"},children:(0,i.jsxs)(e.span,{style:{top:"-2.55em",marginLeft:"0em",marginRight:"0.05em"},children:[(0,i.jsx)(e.span,{className:"pstrut",style:{height:"2.7em"}}),(0,i.jsx)(e.span,{className:"sizing reset-size6 size3 mtight",children:(0,i.jsx)(e.span,{className:"mord mtight",children:"1"})})]})}),(0,i.jsx)(e.span,{className:"vlist-s",children:"\u200b"})]}),(0,i.jsx)(e.span,{className:"vlist-r",children:(0,i.jsx)(e.span,{className:"vlist",style:{height:"0.15em"},children:(0,i.jsx)(e.span,{})})})]})})]}),(0,i.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2778em"}}),(0,i.jsx)(e.span,{className:"mrel",children:"="}),(0,i.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2778em"}})]}),(0,i.jsxs)(e.span,{className:"base",children:[(0,i.jsx)(e.span,{className:"strut",style:{height:"1.53em",verticalAlign:"-0.52em"}}),(0,i.jsx)(e.span,{className:"mord",children:(0,i.jsxs)(e.span,{className:"mord",children:[(0,i.jsx)(e.span,{className:"mopen nulldelimiter"}),(0,i.jsx)(e.span,{className:"mfrac",children:(0,i.jsxs)(e.span,{className:"vlist-t vlist-t2",children:[(0,i.jsxs)(e.span,{className:"vlist-r",children:[(0,i.jsxs)(e.span,{className:"vlist",style:{height:"1.01em"},children:[(0,i.jsxs)(e.span,{style:{top:"-2.655em"},children:[(0,i.jsx)(e.span,{className:"pstrut",style:{height:"3em"}}),(0,i.jsx)(e.span,{className:"sizing reset-size6 size3 mtight",children:(0,i.jsxs)(e.span,{className:"mord mtight",children:[(0,i.jsx)(e.span,{className:"mopen mtight",children:"("}),(0,i.jsxs)(e.span,{className:"mord mtight",children:[(0,i.jsx)(e.span,{className:"mord mathnormal mtight",children:"x"}),(0,i.jsx)(e.span,{className:"msupsub",children:(0,i.jsxs)(e.span,{className:"vlist-t vlist-t2",children:[(0,i.jsxs)(e.span,{className:"vlist-r",children:[(0,i.jsx)(e.span,{className:"vlist",style:{height:"0.3173em"},children:(0,i.jsxs)(e.span,{style:{top:"-2.357em",marginLeft:"0em",marginRight:"0.0714em"},children:[(0,i.jsx)(e.span,{className:"pstrut",style:{height:"2.5em"}}),(0,i.jsx)(e.span,{className:"sizing reset-size3 size1 mtight",children:(0,i.jsx)(e.span,{className:"mord mtight",children:"1"})})]})}),(0,i.jsx)(e.span,{className:"vlist-s",children:"\u200b"})]}),(0,i.jsx)(e.span,{className:"vlist-r",children:(0,i.jsx)(e.span,{className:"vlist",style:{height:"0.143em"},children:(0,i.jsx)(e.span,{})})})]})})]}),(0,i.jsx)(e.span,{className:"mbin mtight",children:"\u2212"}),(0,i.jsxs)(e.span,{className:"mord mtight",children:[(0,i.jsx)(e.span,{className:"mord mathnormal mtight",children:"x"}),(0,i.jsx)(e.span,{className:"msupsub",children:(0,i.jsxs)(e.span,{className:"vlist-t vlist-t2",children:[(0,i.jsxs)(e.span,{className:"vlist-r",children:[(0,i.jsx)(e.span,{className:"vlist",style:{height:"0.3173em"},children:(0,i.jsxs)(e.span,{style:{top:"-2.357em",marginLeft:"0em",marginRight:"0.0714em"},children:[(0,i.jsx)(e.span,{className:"pstrut",style:{height:"2.5em"}}),(0,i.jsx)(e.span,{className:"sizing reset-size3 size1 mtight",children:(0,i.jsx)(e.span,{className:"mord mtight",children:"2"})})]})}),(0,i.jsx)(e.span,{className:"vlist-s",children:"\u200b"})]}),(0,i.jsx)(e.span,{className:"vlist-r",children:(0,i.jsx)(e.span,{className:"vlist",style:{height:"0.143em"},children:(0,i.jsx)(e.span,{})})})]})})]}),(0,i.jsx)(e.span,{className:"mclose mtight",children:")"})]})})]}),(0,i.jsxs)(e.span,{style:{top:"-3.23em"},children:[(0,i.jsx)(e.span,{className:"pstrut",style:{height:"3em"}}),(0,i.jsx)(e.span,{className:"frac-line",style:{borderBottomWidth:"0.04em"}})]}),(0,i.jsxs)(e.span,{style:{top:"-3.485em"},children:[(0,i.jsx)(e.span,{className:"pstrut",style:{height:"3em"}}),(0,i.jsx)(e.span,{className:"sizing reset-size6 size3 mtight",children:(0,i.jsxs)(e.span,{className:"mord mtight",children:[(0,i.jsx)(e.span,{className:"mopen mtight",children:"("}),(0,i.jsxs)(e.span,{className:"mord mtight",children:[(0,i.jsx)(e.span,{className:"mord mathnormal mtight",style:{marginRight:"0.03588em"},children:"y"}),(0,i.jsx)(e.span,{className:"msupsub",children:(0,i.jsxs)(e.span,{className:"vlist-t vlist-t2",children:[(0,i.jsxs)(e.span,{className:"vlist-r",children:[(0,i.jsx)(e.span,{className:"vlist",style:{height:"0.3173em"},children:(0,i.jsxs)(e.span,{style:{top:"-2.357em",marginLeft:"-0.0359em",marginRight:"0.0714em"},children:[(0,i.jsx)(e.span,{className:"pstrut",style:{height:"2.5em"}}),(0,i.jsx)(e.span,{className:"sizing reset-size3 size1 mtight",children:(0,i.jsx)(e.span,{className:"mord mtight",children:"1"})})]})}),(0,i.jsx)(e.span,{className:"vlist-s",children:"\u200b"})]}),(0,i.jsx)(e.span,{className:"vlist-r",children:(0,i.jsx)(e.span,{className:"vlist",style:{height:"0.143em"},children:(0,i.jsx)(e.span,{})})})]})})]}),(0,i.jsx)(e.span,{className:"mbin mtight",children:"\u2212"}),(0,i.jsxs)(e.span,{className:"mord mtight",children:[(0,i.jsx)(e.span,{className:"mord mathnormal mtight",style:{marginRight:"0.03588em"},children:"y"}),(0,i.jsx)(e.span,{className:"msupsub",children:(0,i.jsxs)(e.span,{className:"vlist-t vlist-t2",children:[(0,i.jsxs)(e.span,{className:"vlist-r",children:[(0,i.jsx)(e.span,{className:"vlist",style:{height:"0.3173em"},children:(0,i.jsxs)(e.span,{style:{top:"-2.357em",marginLeft:"-0.0359em",marginRight:"0.0714em"},children:[(0,i.jsx)(e.span,{className:"pstrut",style:{height:"2.5em"}}),(0,i.jsx)(e.span,{className:"sizing reset-size3 size1 mtight",children:(0,i.jsx)(e.span,{className:"mord mtight",children:"2"})})]})}),(0,i.jsx)(e.span,{className:"vlist-s",children:"\u200b"})]}),(0,i.jsx)(e.span,{className:"vlist-r",children:(0,i.jsx)(e.span,{className:"vlist",style:{height:"0.143em"},children:(0,i.jsx)(e.span,{})})})]})})]}),(0,i.jsx)(e.span,{className:"mclose mtight",children:")"})]})})]})]}),(0,i.jsx)(e.span,{className:"vlist-s",children:"\u200b"})]}),(0,i.jsx)(e.span,{className:"vlist-r",children:(0,i.jsx)(e.span,{className:"vlist",style:{height:"0.52em"},children:(0,i.jsx)(e.span,{})})})]})}),(0,i.jsx)(e.span,{className:"mclose nulldelimiter"})]})})]})]})]})}),"\n",(0,i.jsxs)(e.p,{children:["where ",(0,i.jsxs)(e.span,{className:"katex",children:[(0,i.jsx)(e.span,{className:"katex-mathml",children:(0,i.jsx)(e.math,{xmlns:"http://www.w3.org/1998/Math/MathML",children:(0,i.jsxs)(e.semantics,{children:[(0,i.jsx)(e.mrow,{children:(0,i.jsxs)(e.msub,{children:[(0,i.jsx)(e.mi,{children:"x"}),(0,i.jsx)(e.mn,{children:"1"})]})}),(0,i.jsx)(e.annotation,{encoding:"application/x-tex",children:"x_1"})]})})}),(0,i.jsx)(e.span,{className:"katex-html","aria-hidden":"true",children:(0,i.jsxs)(e.span,{className:"base",children:[(0,i.jsx)(e.span,{className:"strut",style:{height:"0.5806em",verticalAlign:"-0.15em"}}),(0,i.jsxs)(e.span,{className:"mord",children:[(0,i.jsx)(e.span,{className:"mord mathnormal",children:"x"}),(0,i.jsx)(e.span,{className:"msupsub",children:(0,i.jsxs)(e.span,{className:"vlist-t vlist-t2",children:[(0,i.jsxs)(e.span,{className:"vlist-r",children:[(0,i.jsx)(e.span,{className:"vlist",style:{height:"0.3011em"},children:(0,i.jsxs)(e.span,{style:{top:"-2.55em",marginLeft:"0em",marginRight:"0.05em"},children:[(0,i.jsx)(e.span,{className:"pstrut",style:{height:"2.7em"}}),(0,i.jsx)(e.span,{className:"sizing reset-size6 size3 mtight",children:(0,i.jsx)(e.span,{className:"mord mtight",children:"1"})})]})}),(0,i.jsx)(e.span,{className:"vlist-s",children:"\u200b"})]}),(0,i.jsx)(e.span,{className:"vlist-r",children:(0,i.jsx)(e.span,{className:"vlist",style:{height:"0.15em"},children:(0,i.jsx)(e.span,{})})})]})})]})]})})]}),", ",(0,i.jsxs)(e.span,{className:"katex",children:[(0,i.jsx)(e.span,{className:"katex-mathml",children:(0,i.jsx)(e.math,{xmlns:"http://www.w3.org/1998/Math/MathML",children:(0,i.jsxs)(e.semantics,{children:[(0,i.jsx)(e.mrow,{children:(0,i.jsxs)(e.msub,{children:[(0,i.jsx)(e.mi,{children:"y"}),(0,i.jsx)(e.mn,{children:"1"})]})}),(0,i.jsx)(e.annotation,{encoding:"application/x-tex",children:"y_1"})]})})}),(0,i.jsx)(e.span,{className:"katex-html","aria-hidden":"true",children:(0,i.jsxs)(e.span,{className:"base",children:[(0,i.jsx)(e.span,{className:"strut",style:{height:"0.625em",verticalAlign:"-0.1944em"}}),(0,i.jsxs)(e.span,{className:"mord",children:[(0,i.jsx)(e.span,{className:"mord mathnormal",style:{marginRight:"0.03588em"},children:"y"}),(0,i.jsx)(e.span,{className:"msupsub",children:(0,i.jsxs)(e.span,{className:"vlist-t vlist-t2",children:[(0,i.jsxs)(e.span,{className:"vlist-r",children:[(0,i.jsx)(e.span,{className:"vlist",style:{height:"0.3011em"},children:(0,i.jsxs)(e.span,{style:{top:"-2.55em",marginLeft:"-0.0359em",marginRight:"0.05em"},children:[(0,i.jsx)(e.span,{className:"pstrut",style:{height:"2.7em"}}),(0,i.jsx)(e.span,{className:"sizing reset-size6 size3 mtight",children:(0,i.jsx)(e.span,{className:"mord mtight",children:"1"})})]})}),(0,i.jsx)(e.span,{className:"vlist-s",children:"\u200b"})]}),(0,i.jsx)(e.span,{className:"vlist-r",children:(0,i.jsx)(e.span,{className:"vlist",style:{height:"0.15em"},children:(0,i.jsx)(e.span,{})})})]})})]})]})})]})," and ",(0,i.jsxs)(e.span,{className:"katex",children:[(0,i.jsx)(e.span,{className:"katex-mathml",children:(0,i.jsx)(e.math,{xmlns:"http://www.w3.org/1998/Math/MathML",children:(0,i.jsxs)(e.semantics,{children:[(0,i.jsx)(e.mrow,{children:(0,i.jsxs)(e.msub,{children:[(0,i.jsx)(e.mi,{children:"x"}),(0,i.jsx)(e.mn,{children:"2"})]})}),(0,i.jsx)(e.annotation,{encoding:"application/x-tex",children:"x_2"})]})})}),(0,i.jsx)(e.span,{className:"katex-html","aria-hidden":"true",children:(0,i.jsxs)(e.span,{className:"base",children:[(0,i.jsx)(e.span,{className:"strut",style:{height:"0.5806em",verticalAlign:"-0.15em"}}),(0,i.jsxs)(e.span,{className:"mord",children:[(0,i.jsx)(e.span,{className:"mord mathnormal",children:"x"}),(0,i.jsx)(e.span,{className:"msupsub",children:(0,i.jsxs)(e.span,{className:"vlist-t vlist-t2",children:[(0,i.jsxs)(e.span,{className:"vlist-r",children:[(0,i.jsx)(e.span,{className:"vlist",style:{height:"0.3011em"},children:(0,i.jsxs)(e.span,{style:{top:"-2.55em",marginLeft:"0em",marginRight:"0.05em"},children:[(0,i.jsx)(e.span,{className:"pstrut",style:{height:"2.7em"}}),(0,i.jsx)(e.span,{className:"sizing reset-size6 size3 mtight",children:(0,i.jsx)(e.span,{className:"mord mtight",children:"2"})})]})}),(0,i.jsx)(e.span,{className:"vlist-s",children:"\u200b"})]}),(0,i.jsx)(e.span,{className:"vlist-r",children:(0,i.jsx)(e.span,{className:"vlist",style:{height:"0.15em"},children:(0,i.jsx)(e.span,{})})})]})})]})]})})]}),", ",(0,i.jsxs)(e.span,{className:"katex",children:[(0,i.jsx)(e.span,{className:"katex-mathml",children:(0,i.jsx)(e.math,{xmlns:"http://www.w3.org/1998/Math/MathML",children:(0,i.jsxs)(e.semantics,{children:[(0,i.jsx)(e.mrow,{children:(0,i.jsxs)(e.msub,{children:[(0,i.jsx)(e.mi,{children:"y"}),(0,i.jsx)(e.mn,{children:"2"})]})}),(0,i.jsx)(e.annotation,{encoding:"application/x-tex",children:"y_2"})]})})}),(0,i.jsx)(e.span,{className:"katex-html","aria-hidden":"true",children:(0,i.jsxs)(e.span,{className:"base",children:[(0,i.jsx)(e.span,{className:"strut",style:{height:"0.625em",verticalAlign:"-0.1944em"}}),(0,i.jsxs)(e.span,{className:"mord",children:[(0,i.jsx)(e.span,{className:"mord mathnormal",style:{marginRight:"0.03588em"},children:"y"}),(0,i.jsx)(e.span,{className:"msupsub",children:(0,i.jsxs)(e.span,{className:"vlist-t vlist-t2",children:[(0,i.jsxs)(e.span,{className:"vlist-r",children:[(0,i.jsx)(e.span,{className:"vlist",style:{height:"0.3011em"},children:(0,i.jsxs)(e.span,{style:{top:"-2.55em",marginLeft:"-0.0359em",marginRight:"0.05em"},children:[(0,i.jsx)(e.span,{className:"pstrut",style:{height:"2.7em"}}),(0,i.jsx)(e.span,{className:"sizing reset-size6 size3 mtight",children:(0,i.jsx)(e.span,{className:"mord mtight",children:"2"})})]})}),(0,i.jsx)(e.span,{className:"vlist-s",children:"\u200b"})]}),(0,i.jsx)(e.span,{className:"vlist-r",children:(0,i.jsx)(e.span,{className:"vlist",style:{height:"0.15em"},children:(0,i.jsx)(e.span,{})})})]})})]})]})})]})," are shares from different messages"]}),"\n",(0,i.jsxs)(e.p,{children:["subsequently, we may use one pair of the shares, ",(0,i.jsxs)(e.span,{className:"katex",children:[(0,i.jsx)(e.span,{className:"katex-mathml",children:(0,i.jsx)(e.math,{xmlns:"http://www.w3.org/1998/Math/MathML",children:(0,i.jsxs)(e.semantics,{children:[(0,i.jsx)(e.mrow,{children:(0,i.jsxs)(e.msub,{children:[(0,i.jsx)(e.mi,{children:"x"}),(0,i.jsx)(e.mn,{children:"1"})]})}),(0,i.jsx)(e.annotation,{encoding:"application/x-tex",children:"x_1"})]})})}),(0,i.jsx)(e.span,{className:"katex-html","aria-hidden":"true",children:(0,i.jsxs)(e.span,{className:"base",children:[(0,i.jsx)(e.span,{className:"strut",style:{height:"0.5806em",verticalAlign:"-0.15em"}}),(0,i.jsxs)(e.span,{className:"mord",children:[(0,i.jsx)(e.span,{className:"mord mathnormal",children:"x"}),(0,i.jsx)(e.span,{className:"msupsub",children:(0,i.jsxs)(e.span,{className:"vlist-t vlist-t2",children:[(0,i.jsxs)(e.span,{className:"vlist-r",children:[(0,i.jsx)(e.span,{className:"vlist",style:{height:"0.3011em"},children:(0,i.jsxs)(e.span,{style:{top:"-2.55em",marginLeft:"0em",marginRight:"0.05em"},children:[(0,i.jsx)(e.span,{className:"pstrut",style:{height:"2.7em"}}),(0,i.jsx)(e.span,{className:"sizing reset-size6 size3 mtight",children:(0,i.jsx)(e.span,{className:"mord mtight",children:"1"})})]})}),(0,i.jsx)(e.span,{className:"vlist-s",children:"\u200b"})]}),(0,i.jsx)(e.span,{className:"vlist-r",children:(0,i.jsx)(e.span,{className:"vlist",style:{height:"0.15em"},children:(0,i.jsx)(e.span,{})})})]})})]})]})})]})," and ",(0,i.jsxs)(e.span,{className:"katex",children:[(0,i.jsx)(e.span,{className:"katex-mathml",children:(0,i.jsx)(e.math,{xmlns:"http://www.w3.org/1998/Math/MathML",children:(0,i.jsxs)(e.semantics,{children:[(0,i.jsx)(e.mrow,{children:(0,i.jsxs)(e.msub,{children:[(0,i.jsx)(e.mi,{children:"y"}),(0,i.jsx)(e.mn,{children:"1"})]})}),(0,i.jsx)(e.annotation,{encoding:"application/x-tex",children:"y_1"})]})})}),(0,i.jsx)(e.span,{className:"katex-html","aria-hidden":"true",children:(0,i.jsxs)(e.span,{className:"base",children:[(0,i.jsx)(e.span,{className:"strut",style:{height:"0.625em",verticalAlign:"-0.1944em"}}),(0,i.jsxs)(e.span,{className:"mord",children:[(0,i.jsx)(e.span,{className:"mord mathnormal",style:{marginRight:"0.03588em"},children:"y"}),(0,i.jsx)(e.span,{className:"msupsub",children:(0,i.jsxs)(e.span,{className:"vlist-t vlist-t2",children:[(0,i.jsxs)(e.span,{className:"vlist-r",children:[(0,i.jsx)(e.span,{className:"vlist",style:{height:"0.3011em"},children:(0,i.jsxs)(e.span,{style:{top:"-2.55em",marginLeft:"-0.0359em",marginRight:"0.05em"},children:[(0,i.jsx)(e.span,{className:"pstrut",style:{height:"2.7em"}}),(0,i.jsx)(e.span,{className:"sizing reset-size6 size3 mtight",children:(0,i.jsx)(e.span,{className:"mord mtight",children:"1"})})]})}),(0,i.jsx)(e.span,{className:"vlist-s",children:"\u200b"})]}),(0,i.jsx)(e.span,{className:"vlist-r",children:(0,i.jsx)(e.span,{className:"vlist",style:{height:"0.15em"},children:(0,i.jsx)(e.span,{})})})]})})]})]})})]})," to obtain the ",(0,i.jsx)(e.code,{children:"identitySecret"})]}),"\n",(0,i.jsx)(e.p,{children:(0,i.jsxs)(e.span,{className:"katex",children:[(0,i.jsx)(e.span,{className:"katex-mathml",children:(0,i.jsx)(e.math,{xmlns:"http://www.w3.org/1998/Math/MathML",children:(0,i.jsxs)(e.semantics,{children:[(0,i.jsxs)(e.mrow,{children:[(0,i.jsx)(e.mi,{children:"i"}),(0,i.jsx)(e.mi,{children:"d"}),(0,i.jsx)(e.mi,{children:"e"}),(0,i.jsx)(e.mi,{children:"n"}),(0,i.jsx)(e.mi,{children:"t"}),(0,i.jsx)(e.mi,{children:"i"}),(0,i.jsx)(e.mi,{children:"t"}),(0,i.jsx)(e.mi,{children:"y"}),(0,i.jsx)(e.mi,{children:"S"}),(0,i.jsx)(e.mi,{children:"e"}),(0,i.jsx)(e.mi,{children:"c"}),(0,i.jsx)(e.mi,{children:"r"}),(0,i.jsx)(e.mi,{children:"e"}),(0,i.jsx)(e.mi,{children:"t"}),(0,i.jsx)(e.mo,{children:"="}),(0,i.jsxs)(e.msub,{children:[(0,i.jsx)(e.mi,{children:"y"}),(0,i.jsx)(e.mn,{children:"1"})]}),(0,i.jsx)(e.mo,{children:"\u2212"}),(0,i.jsxs)(e.msub,{children:[(0,i.jsx)(e.mi,{children:"a"}),(0,i.jsx)(e.mn,{children:"1"})]}),(0,i.jsx)(e.mo,{children:"\u2217"}),(0,i.jsx)(e.mi,{children:"x"})]}),(0,i.jsx)(e.annotation,{encoding:"application/x-tex",children:"identitySecret = y_1 - a_1 * x"})]})})}),(0,i.jsxs)(e.span,{className:"katex-html","aria-hidden":"true",children:[(0,i.jsxs)(e.span,{className:"base",children:[(0,i.jsx)(e.span,{className:"strut",style:{height:"0.8889em",verticalAlign:"-0.1944em"}}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"i"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"d"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"e"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"n"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"t"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"i"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"t"}),(0,i.jsx)(e.span,{className:"mord mathnormal",style:{marginRight:"0.03588em"},children:"y"}),(0,i.jsx)(e.span,{className:"mord mathnormal",style:{marginRight:"0.05764em"},children:"S"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"ecre"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"t"}),(0,i.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2778em"}}),(0,i.jsx)(e.span,{className:"mrel",children:"="}),(0,i.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2778em"}})]}),(0,i.jsxs)(e.span,{className:"base",children:[(0,i.jsx)(e.span,{className:"strut",style:{height:"0.7778em",verticalAlign:"-0.1944em"}}),(0,i.jsxs)(e.span,{className:"mord",children:[(0,i.jsx)(e.span,{className:"mord mathnormal",style:{marginRight:"0.03588em"},children:"y"}),(0,i.jsx)(e.span,{className:"msupsub",children:(0,i.jsxs)(e.span,{className:"vlist-t vlist-t2",children:[(0,i.jsxs)(e.span,{className:"vlist-r",children:[(0,i.jsx)(e.span,{className:"vlist",style:{height:"0.3011em"},children:(0,i.jsxs)(e.span,{style:{top:"-2.55em",marginLeft:"-0.0359em",marginRight:"0.05em"},children:[(0,i.jsx)(e.span,{className:"pstrut",style:{height:"2.7em"}}),(0,i.jsx)(e.span,{className:"sizing reset-size6 size3 mtight",children:(0,i.jsx)(e.span,{className:"mord mtight",children:"1"})})]})}),(0,i.jsx)(e.span,{className:"vlist-s",children:"\u200b"})]}),(0,i.jsx)(e.span,{className:"vlist-r",children:(0,i.jsx)(e.span,{className:"vlist",style:{height:"0.15em"},children:(0,i.jsx)(e.span,{})})})]})})]}),(0,i.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2222em"}}),(0,i.jsx)(e.span,{className:"mbin",children:"\u2212"}),(0,i.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2222em"}})]}),(0,i.jsxs)(e.span,{className:"base",children:[(0,i.jsx)(e.span,{className:"strut",style:{height:"0.6153em",verticalAlign:"-0.15em"}}),(0,i.jsxs)(e.span,{className:"mord",children:[(0,i.jsx)(e.span,{className:"mord mathnormal",children:"a"}),(0,i.jsx)(e.span,{className:"msupsub",children:(0,i.jsxs)(e.span,{className:"vlist-t vlist-t2",children:[(0,i.jsxs)(e.span,{className:"vlist-r",children:[(0,i.jsx)(e.span,{className:"vlist",style:{height:"0.3011em"},children:(0,i.jsxs)(e.span,{style:{top:"-2.55em",marginLeft:"0em",marginRight:"0.05em"},children:[(0,i.jsx)(e.span,{className:"pstrut",style:{height:"2.7em"}}),(0,i.jsx)(e.span,{className:"sizing reset-size6 size3 mtight",children:(0,i.jsx)(e.span,{className:"mord mtight",children:"1"})})]})}),(0,i.jsx)(e.span,{className:"vlist-s",children:"\u200b"})]}),(0,i.jsx)(e.span,{className:"vlist-r",children:(0,i.jsx)(e.span,{className:"vlist",style:{height:"0.15em"},children:(0,i.jsx)(e.span,{})})})]})})]}),(0,i.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2222em"}}),(0,i.jsx)(e.span,{className:"mbin",children:"\u2217"}),(0,i.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2222em"}})]}),(0,i.jsxs)(e.span,{className:"base",children:[(0,i.jsx)(e.span,{className:"strut",style:{height:"0.4306em"}}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"x"})]})]})]})}),"\n",(0,i.jsxs)(e.p,{children:["This enables RLN to be used for rate limiting with a ",(0,i.jsx)(e.em,{children:"global"})," limit. For arbitrary limits,\nplease refer to an article written by @curryrasul, ",(0,i.jsx)(e.a,{href:"https://mirror.xyz/privacy-scaling-explorations.eth/iCLmH1JVb7fDqp6Mms2NR001m2_n5OOSHsLF2QrxDnQ",children:"rln-v2"}),"."]}),"\n",(0,i.jsx)(e.h2,{id:"wakus-problem-with-dos",children:"Waku's problem with DoS"}),"\n",(0,i.jsxs)(e.p,{children:["In a decentralized, privacy focused messaging system like ",(0,i.jsx)(e.a,{href:"https://waku.org",children:"Waku"}),",\nDenial of Service (DoS) vulnerabilities are very common, and must be addressed to promote network scale and optimal bandwidth utilization."]}),"\n",(0,i.jsx)(e.h3,{id:"dos-prevention-with-user-metadata",children:"DoS prevention with user metadata"}),"\n",(0,i.jsx)(e.p,{children:"There are a couple of ways a user can be rate-limited, either -"}),"\n",(0,i.jsxs)(e.ol,{children:["\n",(0,i.jsx)(e.li,{children:"IP Logging"}),"\n",(0,i.jsx)(e.li,{children:"KYC Logging"}),"\n"]}),"\n",(0,i.jsx)(e.p,{children:"Both IP and KYC logging prevent systems from being truly anonymous, and hence, cannot be used as a valid DoS prevention mechanism for Waku."}),"\n",(0,i.jsx)(e.p,{children:"RLN can be used as an alternative, which provides the best of both worlds, i.e a permissioned membership set, as well as anonymous signaling.\nHowever, we are bound by k-anonymity rules of the membership set."}),"\n",(0,i.jsxs)(e.p,{children:[(0,i.jsx)(e.a,{href:"https://rfc.vac.dev/waku/standards/core/17/rln-relay",children:"Waku-RLN-Relay"})," is a ",(0,i.jsx)(e.a,{href:"https://libp2p.io",children:"libp2p"})," pubsub validator that verifies if a proof attached to a given message is valid.\nIn case the proof is valid, the message is relayed."]}),"\n",(0,i.jsx)(e.h2,{id:"performance-analysis",children:"Performance analysis"}),"\n",(0,i.jsxs)(e.blockquote,{children:["\n",(0,i.jsx)(e.p,{children:"Test bench specs: AMD EPYC 7502P 32-Core, 4x32GB DDR4 Reg.ECC Memory"}),"\n"]}),"\n",(0,i.jsxs)(e.p,{children:["This simulation was conducted by @alrevuelta, and is described in more detail ",(0,i.jsx)(e.a,{href:"https://github.com/waku-org/research/issues/23",children:"here"}),"."]}),"\n",(0,i.jsx)(e.p,{children:"The simulation included 100 waku nodes running in parallel."}),"\n",(0,i.jsxs)(e.p,{children:["Proof generation times -\n",(0,i.jsx)(e.img,{alt:"img",src:a(56699).A+"",width:"1547",height:"1096"})]}),"\n",(0,i.jsxs)(e.p,{children:["Proof verification times -\n",(0,i.jsx)(e.img,{alt:"img",src:a(70526).A+"",width:"1564",height:"1214"})]}),"\n",(0,i.jsxs)(e.p,{children:["A spammer node publishes 3000 msg/epoch, which is detected by all connected nodes, and subsequently disconnect to prevent further spam -\n",(0,i.jsx)(e.img,{alt:"img",src:a(26203).A+"",width:"1574",height:"1108"})]}),"\n",(0,i.jsx)(e.h2,{id:"security-analysis",children:"Security analysis"}),"\n",(0,i.jsxs)(e.p,{children:[(0,i.jsx)(e.a,{href:"https://doi.org/10.1007/s00145-018-9280-5",children:"Barbulescu and Duquesne"}),"\nconclude that that the ",(0,i.jsx)(e.code,{children:"bn254"})," curve has only 100 bits of security.\nSince the bn254 curve has a small embedding degree,\nit is vulnerable to the ",(0,i.jsx)(e.a,{href:"https://en.wikipedia.org/wiki/MOV_attack",children:"MOV attack"}),".\nHowever, the MOV attack is only applicable to pairings,\nand not to the elliptic curve itself.\nIt is acceptable to use the bn254 curve for RLN,\nsince the circuit does not make use of pairings."]}),"\n",(0,i.jsxs)(e.p,{children:[(0,i.jsx)(e.a,{href:"https://github.com/vacp2p/research/issues/155",children:"An analysis"})," on the number of rounds in the Poseidon hash function was done,\nwhich concluded that the hashing rounds should ",(0,i.jsx)(e.em,{children:"not"})," be reduced,"]}),"\n",(0,i.jsxs)(e.p,{children:["The ",(0,i.jsx)(e.a,{href:"https://github.com/vacp2p/rln-contract",children:"smart contracts"})," have ",(0,i.jsx)(e.em,{children:"not"})," been audited, and are not recommended for real world deployments ",(0,i.jsx)(e.em,{children:"yet"}),"."]}),"\n",(0,i.jsx)(e.h2,{id:"storage-analysis",children:"Storage analysis"}),"\n",(0,i.jsx)(e.span,{className:"katex-display",children:(0,i.jsxs)(e.span,{className:"katex",children:[(0,i.jsx)(e.span,{className:"katex-mathml",children:(0,i.jsx)(e.math,{xmlns:"http://www.w3.org/1998/Math/MathML",display:"block",children:(0,i.jsxs)(e.semantics,{children:[(0,i.jsxs)(e.mrow,{children:[(0,i.jsx)(e.mi,{children:"c"}),(0,i.jsx)(e.mi,{children:"o"}),(0,i.jsx)(e.mi,{children:"m"}),(0,i.jsx)(e.mi,{children:"m"}),(0,i.jsx)(e.mi,{children:"i"}),(0,i.jsx)(e.mi,{children:"t"}),(0,i.jsx)(e.mi,{children:"m"}),(0,i.jsx)(e.mi,{children:"e"}),(0,i.jsx)(e.mi,{children:"n"}),(0,i.jsx)(e.mi,{children:"t"}),(0,i.jsx)(e.mi,{mathvariant:"normal",children:"_"}),(0,i.jsx)(e.mi,{children:"s"}),(0,i.jsx)(e.mi,{children:"i"}),(0,i.jsx)(e.mi,{children:"z"}),(0,i.jsx)(e.mi,{children:"e"}),(0,i.jsx)(e.mo,{children:"="}),(0,i.jsx)(e.mn,{children:"32"}),(0,i.jsx)(e.mtext,{children:"\xa0"}),(0,i.jsx)(e.mi,{children:"b"}),(0,i.jsx)(e.mi,{children:"y"}),(0,i.jsx)(e.mi,{children:"t"}),(0,i.jsx)(e.mi,{children:"e"}),(0,i.jsx)(e.mi,{children:"s"}),(0,i.jsx)(e.mspace,{linebreak:"newline"}),(0,i.jsx)(e.mi,{children:"t"}),(0,i.jsx)(e.mi,{children:"r"}),(0,i.jsx)(e.mi,{children:"e"}),(0,i.jsx)(e.mi,{children:"e"}),(0,i.jsx)(e.mi,{mathvariant:"normal",children:"_"}),(0,i.jsx)(e.mi,{children:"h"}),(0,i.jsx)(e.mi,{children:"e"}),(0,i.jsx)(e.mi,{children:"i"}),(0,i.jsx)(e.mi,{children:"g"}),(0,i.jsx)(e.mi,{children:"h"}),(0,i.jsx)(e.mi,{children:"t"}),(0,i.jsx)(e.mo,{children:"="}),(0,i.jsx)(e.mn,{children:"20"}),(0,i.jsx)(e.mspace,{linebreak:"newline"}),(0,i.jsx)(e.mi,{children:"t"}),(0,i.jsx)(e.mi,{children:"o"}),(0,i.jsx)(e.mi,{children:"t"}),(0,i.jsx)(e.mi,{children:"a"}),(0,i.jsx)(e.mi,{children:"l"}),(0,i.jsx)(e.mi,{mathvariant:"normal",children:"_"}),(0,i.jsx)(e.mi,{children:"l"}),(0,i.jsx)(e.mi,{children:"e"}),(0,i.jsx)(e.mi,{children:"a"}),(0,i.jsx)(e.mi,{children:"v"}),(0,i.jsx)(e.mi,{children:"e"}),(0,i.jsx)(e.mi,{children:"s"}),(0,i.jsx)(e.mo,{children:"="}),(0,i.jsxs)(e.msup,{children:[(0,i.jsx)(e.mn,{children:"2"}),(0,i.jsx)(e.mn,{children:"20"})]}),(0,i.jsx)(e.mspace,{linebreak:"newline"}),(0,i.jsx)(e.mi,{children:"m"}),(0,i.jsx)(e.mi,{children:"a"}),(0,i.jsx)(e.mi,{children:"x"}),(0,i.jsx)(e.mi,{mathvariant:"normal",children:"_"}),(0,i.jsx)(e.mi,{children:"t"}),(0,i.jsx)(e.mi,{children:"r"}),(0,i.jsx)(e.mi,{children:"e"}),(0,i.jsx)(e.mi,{children:"e"}),(0,i.jsx)(e.mi,{mathvariant:"normal",children:"_"}),(0,i.jsx)(e.mi,{children:"s"}),(0,i.jsx)(e.mi,{children:"i"}),(0,i.jsx)(e.mi,{children:"z"}),(0,i.jsx)(e.mi,{children:"e"}),(0,i.jsx)(e.mo,{children:"="}),(0,i.jsx)(e.mi,{children:"t"}),(0,i.jsx)(e.mi,{children:"o"}),(0,i.jsx)(e.mi,{children:"t"}),(0,i.jsx)(e.mi,{children:"a"}),(0,i.jsx)(e.mi,{children:"l"}),(0,i.jsx)(e.mi,{mathvariant:"normal",children:"_"}),(0,i.jsx)(e.mi,{children:"l"}),(0,i.jsx)(e.mi,{children:"e"}),(0,i.jsx)(e.mi,{children:"a"}),(0,i.jsx)(e.mi,{children:"v"}),(0,i.jsx)(e.mi,{children:"e"}),(0,i.jsx)(e.mi,{children:"s"}),(0,i.jsx)(e.mo,{children:"\u2217"}),(0,i.jsx)(e.mi,{children:"c"}),(0,i.jsx)(e.mi,{children:"o"}),(0,i.jsx)(e.mi,{children:"m"}),(0,i.jsx)(e.mi,{children:"m"}),(0,i.jsx)(e.mi,{children:"i"}),(0,i.jsx)(e.mi,{children:"t"}),(0,i.jsx)(e.mi,{children:"m"}),(0,i.jsx)(e.mi,{children:"e"}),(0,i.jsx)(e.mi,{children:"n"}),(0,i.jsx)(e.mi,{children:"t"}),(0,i.jsx)(e.mi,{mathvariant:"normal",children:"_"}),(0,i.jsx)(e.mi,{children:"s"}),(0,i.jsx)(e.mi,{children:"i"}),(0,i.jsx)(e.mi,{children:"z"}),(0,i.jsx)(e.mi,{children:"e"}),(0,i.jsx)(e.mspace,{linebreak:"newline"}),(0,i.jsx)(e.mi,{children:"m"}),(0,i.jsx)(e.mi,{children:"a"}),(0,i.jsx)(e.mi,{children:"x"}),(0,i.jsx)(e.mi,{mathvariant:"normal",children:"_"}),(0,i.jsx)(e.mi,{children:"t"}),(0,i.jsx)(e.mi,{children:"r"}),(0,i.jsx)(e.mi,{children:"e"}),(0,i.jsx)(e.mi,{children:"e"}),(0,i.jsx)(e.mi,{mathvariant:"normal",children:"_"}),(0,i.jsx)(e.mi,{children:"s"}),(0,i.jsx)(e.mi,{children:"i"}),(0,i.jsx)(e.mi,{children:"z"}),(0,i.jsx)(e.mi,{children:"e"}),(0,i.jsx)(e.mo,{children:"="}),(0,i.jsxs)(e.msup,{children:[(0,i.jsx)(e.mn,{children:"2"}),(0,i.jsx)(e.mn,{children:"20"})]}),(0,i.jsx)(e.mo,{children:"\u2217"}),(0,i.jsx)(e.mn,{children:"32"}),(0,i.jsx)(e.mo,{children:"="}),(0,i.jsx)(e.mn,{children:"33"}),(0,i.jsx)(e.mo,{separator:"true",children:","}),(0,i.jsx)(e.mn,{children:"554"}),(0,i.jsx)(e.mo,{separator:"true",children:","}),(0,i.jsx)(e.mn,{children:"432"}),(0,i.jsx)(e.mspace,{linebreak:"newline"}),(0,i.jsx)(e.mo,{children:"\u2234"}),(0,i.jsx)(e.mi,{children:"m"}),(0,i.jsx)(e.mi,{children:"a"}),(0,i.jsx)(e.mi,{children:"x"}),(0,i.jsx)(e.mi,{mathvariant:"normal",children:"_"}),(0,i.jsx)(e.mi,{children:"t"}),(0,i.jsx)(e.mi,{children:"r"}),(0,i.jsx)(e.mi,{children:"e"}),(0,i.jsx)(e.mi,{children:"e"}),(0,i.jsx)(e.mi,{mathvariant:"normal",children:"_"}),(0,i.jsx)(e.mi,{children:"s"}),(0,i.jsx)(e.mi,{children:"i"}),(0,i.jsx)(e.mi,{children:"z"}),(0,i.jsx)(e.mi,{children:"e"}),(0,i.jsx)(e.mo,{children:"="}),(0,i.jsx)(e.mn,{children:"33.55"}),(0,i.jsx)(e.mtext,{children:"\xa0"}),(0,i.jsx)(e.mi,{children:"m"}),(0,i.jsx)(e.mi,{children:"e"}),(0,i.jsx)(e.mi,{children:"g"}),(0,i.jsx)(e.mi,{children:"a"}),(0,i.jsx)(e.mi,{children:"b"}),(0,i.jsx)(e.mi,{children:"y"}),(0,i.jsx)(e.mi,{children:"t"}),(0,i.jsx)(e.mi,{children:"e"}),(0,i.jsx)(e.mi,{children:"s"})]}),(0,i.jsx)(e.annotation,{encoding:"application/x-tex",children:"commitment\\_size = 32\\ bytes \\\\\ntree\\_height =20 \\\\\ntotal\\_leaves = 2^{20} \\\\ \nmax\\_tree\\_size = total\\_leaves * commitment\\_size \\\\\nmax\\_tree\\_size = 2^{20} * 32 = 33,554,432 \\\\\n\u2234max\\_tree\\_size = 33.55\\ megabytes"})]})})}),(0,i.jsxs)(e.span,{className:"katex-html","aria-hidden":"true",children:[(0,i.jsxs)(e.span,{className:"base",children:[(0,i.jsx)(e.span,{className:"strut",style:{height:"0.9695em",verticalAlign:"-0.31em"}}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"co"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"mmi"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"t"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"m"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"e"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"n"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"t"}),(0,i.jsx)(e.span,{className:"mord",style:{marginRight:"0.02778em"},children:"_"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"s"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"i"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"ze"}),(0,i.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2778em"}}),(0,i.jsx)(e.span,{className:"mrel",children:"="}),(0,i.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2778em"}})]}),(0,i.jsxs)(e.span,{className:"base",children:[(0,i.jsx)(e.span,{className:"strut",style:{height:"0.8889em",verticalAlign:"-0.1944em"}}),(0,i.jsx)(e.span,{className:"mord",children:"32"}),(0,i.jsx)(e.span,{className:"mspace",children:"\xa0"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"b"}),(0,i.jsx)(e.span,{className:"mord mathnormal",style:{marginRight:"0.03588em"},children:"y"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"t"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"es"})]}),(0,i.jsx)(e.span,{className:"mspace newline"}),(0,i.jsxs)(e.span,{className:"base",children:[(0,i.jsx)(e.span,{className:"strut",style:{height:"1.0044em",verticalAlign:"-0.31em"}}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"t"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"ree"}),(0,i.jsx)(e.span,{className:"mord",style:{marginRight:"0.02778em"},children:"_"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"h"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"e"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"i"}),(0,i.jsx)(e.span,{className:"mord mathnormal",style:{marginRight:"0.03588em"},children:"g"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"h"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"t"}),(0,i.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2778em"}}),(0,i.jsx)(e.span,{className:"mrel",children:"="}),(0,i.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2778em"}})]}),(0,i.jsxs)(e.span,{className:"base",children:[(0,i.jsx)(e.span,{className:"strut",style:{height:"0.6444em"}}),(0,i.jsx)(e.span,{className:"mord",children:"20"})]}),(0,i.jsx)(e.span,{className:"mspace newline"}),(0,i.jsxs)(e.span,{className:"base",children:[(0,i.jsx)(e.span,{className:"strut",style:{height:"1.0044em",verticalAlign:"-0.31em"}}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"t"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"o"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"t"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"a"}),(0,i.jsx)(e.span,{className:"mord mathnormal",style:{marginRight:"0.01968em"},children:"l"}),(0,i.jsx)(e.span,{className:"mord",style:{marginRight:"0.02778em"},children:"_"}),(0,i.jsx)(e.span,{className:"mord mathnormal",style:{marginRight:"0.01968em"},children:"l"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"e"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"a"}),(0,i.jsx)(e.span,{className:"mord mathnormal",style:{marginRight:"0.03588em"},children:"v"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"es"}),(0,i.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2778em"}}),(0,i.jsx)(e.span,{className:"mrel",children:"="}),(0,i.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2778em"}})]}),(0,i.jsxs)(e.span,{className:"base",children:[(0,i.jsx)(e.span,{className:"strut",style:{height:"0.8641em"}}),(0,i.jsxs)(e.span,{className:"mord",children:[(0,i.jsx)(e.span,{className:"mord",children:"2"}),(0,i.jsx)(e.span,{className:"msupsub",children:(0,i.jsx)(e.span,{className:"vlist-t",children:(0,i.jsx)(e.span,{className:"vlist-r",children:(0,i.jsx)(e.span,{className:"vlist",style:{height:"0.8641em"},children:(0,i.jsxs)(e.span,{style:{top:"-3.113em",marginRight:"0.05em"},children:[(0,i.jsx)(e.span,{className:"pstrut",style:{height:"2.7em"}}),(0,i.jsx)(e.span,{className:"sizing reset-size6 size3 mtight",children:(0,i.jsx)(e.span,{className:"mord mtight",children:(0,i.jsx)(e.span,{className:"mord mtight",children:"20"})})})]})})})})})]})]}),(0,i.jsx)(e.span,{className:"mspace newline"}),(0,i.jsxs)(e.span,{className:"base",children:[(0,i.jsx)(e.span,{className:"strut",style:{height:"0.9695em",verticalAlign:"-0.31em"}}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"ma"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"x"}),(0,i.jsx)(e.span,{className:"mord",style:{marginRight:"0.02778em"},children:"_"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"t"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"ree"}),(0,i.jsx)(e.span,{className:"mord",style:{marginRight:"0.02778em"},children:"_"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"s"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"i"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"ze"}),(0,i.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2778em"}}),(0,i.jsx)(e.span,{className:"mrel",children:"="}),(0,i.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2778em"}})]}),(0,i.jsxs)(e.span,{className:"base",children:[(0,i.jsx)(e.span,{className:"strut",style:{height:"1.0044em",verticalAlign:"-0.31em"}}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"t"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"o"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"t"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"a"}),(0,i.jsx)(e.span,{className:"mord mathnormal",style:{marginRight:"0.01968em"},children:"l"}),(0,i.jsx)(e.span,{className:"mord",style:{marginRight:"0.02778em"},children:"_"}),(0,i.jsx)(e.span,{className:"mord mathnormal",style:{marginRight:"0.01968em"},children:"l"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"e"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"a"}),(0,i.jsx)(e.span,{className:"mord mathnormal",style:{marginRight:"0.03588em"},children:"v"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"es"}),(0,i.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2222em"}}),(0,i.jsx)(e.span,{className:"mbin",children:"\u2217"}),(0,i.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2222em"}})]}),(0,i.jsxs)(e.span,{className:"base",children:[(0,i.jsx)(e.span,{className:"strut",style:{height:"0.9695em",verticalAlign:"-0.31em"}}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"co"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"mmi"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"t"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"m"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"e"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"n"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"t"}),(0,i.jsx)(e.span,{className:"mord",style:{marginRight:"0.02778em"},children:"_"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"s"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"i"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"ze"})]}),(0,i.jsx)(e.span,{className:"mspace newline"}),(0,i.jsxs)(e.span,{className:"base",children:[(0,i.jsx)(e.span,{className:"strut",style:{height:"0.9695em",verticalAlign:"-0.31em"}}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"ma"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"x"}),(0,i.jsx)(e.span,{className:"mord",style:{marginRight:"0.02778em"},children:"_"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"t"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"ree"}),(0,i.jsx)(e.span,{className:"mord",style:{marginRight:"0.02778em"},children:"_"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"s"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"i"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"ze"}),(0,i.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2778em"}}),(0,i.jsx)(e.span,{className:"mrel",children:"="}),(0,i.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2778em"}})]}),(0,i.jsxs)(e.span,{className:"base",children:[(0,i.jsx)(e.span,{className:"strut",style:{height:"0.8641em"}}),(0,i.jsxs)(e.span,{className:"mord",children:[(0,i.jsx)(e.span,{className:"mord",children:"2"}),(0,i.jsx)(e.span,{className:"msupsub",children:(0,i.jsx)(e.span,{className:"vlist-t",children:(0,i.jsx)(e.span,{className:"vlist-r",children:(0,i.jsx)(e.span,{className:"vlist",style:{height:"0.8641em"},children:(0,i.jsxs)(e.span,{style:{top:"-3.113em",marginRight:"0.05em"},children:[(0,i.jsx)(e.span,{className:"pstrut",style:{height:"2.7em"}}),(0,i.jsx)(e.span,{className:"sizing reset-size6 size3 mtight",children:(0,i.jsx)(e.span,{className:"mord mtight",children:(0,i.jsx)(e.span,{className:"mord mtight",children:"20"})})})]})})})})})]}),(0,i.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2222em"}}),(0,i.jsx)(e.span,{className:"mbin",children:"\u2217"}),(0,i.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2222em"}})]}),(0,i.jsxs)(e.span,{className:"base",children:[(0,i.jsx)(e.span,{className:"strut",style:{height:"0.6444em"}}),(0,i.jsx)(e.span,{className:"mord",children:"32"}),(0,i.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2778em"}}),(0,i.jsx)(e.span,{className:"mrel",children:"="}),(0,i.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2778em"}})]}),(0,i.jsxs)(e.span,{className:"base",children:[(0,i.jsx)(e.span,{className:"strut",style:{height:"0.8389em",verticalAlign:"-0.1944em"}}),(0,i.jsx)(e.span,{className:"mord",children:"33"}),(0,i.jsx)(e.span,{className:"mpunct",children:","}),(0,i.jsx)(e.span,{className:"mspace",style:{marginRight:"0.1667em"}}),(0,i.jsx)(e.span,{className:"mord",children:"554"}),(0,i.jsx)(e.span,{className:"mpunct",children:","}),(0,i.jsx)(e.span,{className:"mspace",style:{marginRight:"0.1667em"}}),(0,i.jsx)(e.span,{className:"mord",children:"432"})]}),(0,i.jsx)(e.span,{className:"mspace newline"}),(0,i.jsxs)(e.span,{className:"base",children:[(0,i.jsx)(e.span,{className:"strut",style:{height:"0.6922em"}}),(0,i.jsx)(e.span,{className:"mrel amsrm",children:"\u2234"}),(0,i.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2778em"}})]}),(0,i.jsxs)(e.span,{className:"base",children:[(0,i.jsx)(e.span,{className:"strut",style:{height:"0.9695em",verticalAlign:"-0.31em"}}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"ma"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"x"}),(0,i.jsx)(e.span,{className:"mord",style:{marginRight:"0.02778em"},children:"_"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"t"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"ree"}),(0,i.jsx)(e.span,{className:"mord",style:{marginRight:"0.02778em"},children:"_"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"s"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"i"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"ze"}),(0,i.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2778em"}}),(0,i.jsx)(e.span,{className:"mrel",children:"="}),(0,i.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2778em"}})]}),(0,i.jsxs)(e.span,{className:"base",children:[(0,i.jsx)(e.span,{className:"strut",style:{height:"0.8889em",verticalAlign:"-0.1944em"}}),(0,i.jsx)(e.span,{className:"mord",children:"33.55"}),(0,i.jsx)(e.span,{className:"mspace",children:"\xa0"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"m"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"e"}),(0,i.jsx)(e.span,{className:"mord mathnormal",style:{marginRight:"0.03588em"},children:"g"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"ab"}),(0,i.jsx)(e.span,{className:"mord mathnormal",style:{marginRight:"0.03588em"},children:"y"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"t"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"es"})]})]})]})}),"\n",(0,i.jsx)(e.p,{children:"The storage overhead introduced by RLN is minimal.\nRLN only requires 34 megabytes of storage, which poses no problem on most end-user hardware, with the exception of IoT/microcontrollers.\nStill, we are working on further optimizations allowing proof generation without having to store the full tree."}),"\n",(0,i.jsx)(e.h2,{id:"the-bare-minimum-requirements-to-run-rln",children:"The bare minimum requirements to run RLN"}),"\n",(0,i.jsx)(e.p,{children:"With proof generation time in sub-second latency, along with low storage overhead for the tree,\nit is possible for end users to generate and verify RLN proofs on a modern smartphone."}),"\n",(0,i.jsxs)(e.p,{children:["Following is a demo provided by @rramos that demonstrates\n",(0,i.jsx)(e.a,{href:"https://drive.google.com/file/d/1ITLYrDOQrHQX2_3Q6O5EqKPYJN8Ye2gF/view?usp=sharing",children:"waku-rln-relay used in react native"}),"."]}),"\n",(0,i.jsxs)(e.blockquote,{children:["\n",(0,i.jsx)(e.p,{children:"Warning: The react native sdk will be deprecated soon, and the above demo should serve as a PoC for RLN on mobiles"}),"\n"]}),"\n",(0,i.jsx)(e.h2,{id:"rln-usage-guide",children:"RLN usage guide"}),"\n",(0,i.jsxs)(e.p,{children:[(0,i.jsx)(e.a,{href:"https://github.com/vacp2p/zerokit",children:"Zerokit"})," implements api's that allow users to handle operations to the tree,\nas well as generate/verify RLN proofs."]}),"\n",(0,i.jsxs)(e.p,{children:["Our main implementation of RLN can be accessed via this Rust ",(0,i.jsx)(e.a,{href:"https://crates.io/crates/rln",children:"crate"}),",\nwhich is documented ",(0,i.jsx)(e.a,{href:"https://docs.rs/rln/0.4.1/rln/public/struct.RLN.html",children:"here"}),".\nIt can used in other langugages via the FFI API, which is documented ",(0,i.jsx)(e.a,{href:"https://docs.rs/rln/0.4.1/rln/ffi/index.html",children:"here"}),".\nThe usage of RLN in Waku is detailed in our ",(0,i.jsx)(e.a,{href:"https://hackmd.io/7cBCMU5hS5OYv8PTaW2wAQ?view",children:"RLN Implementers guide"}),",\nwhich provides step-by-step instructions on how to run Waku-RLN-Relay."]}),"\n",(0,i.jsx)(e.p,{children:"Following is a diagram that will help understand the dependency tree -"}),"\n",(0,i.jsx)(e.p,{children:(0,i.jsx)(e.img,{alt:"rln-dep-tree",src:a(2937).A+"",width:"631",height:"552"})}),"\n",(0,i.jsx)(e.h2,{id:"future-work",children:"Future work"}),"\n",(0,i.jsxs)(e.ul,{children:["\n",(0,i.jsx)(e.li,{children:"Optimizations to zerokit for proof generation time."}),"\n",(0,i.jsx)(e.li,{children:"Incrementing tree depth from 20 to 32, to allow more memberships."}),"\n",(0,i.jsx)(e.li,{children:"Optimizations to the smart contract."}),"\n",(0,i.jsx)(e.li,{children:"An ability to signal validity of a message in different time windows."}),"\n",(0,i.jsx)(e.li,{children:"Usage of proving systems other than Groth16."}),"\n"]}),"\n",(0,i.jsx)(e.h2,{id:"references",children:"References"}),"\n",(0,i.jsxs)(e.ul,{children:["\n",(0,i.jsx)(e.li,{children:(0,i.jsx)(e.a,{href:"https://github.com/rate-limiting-nullifier/circom-rln",children:"RLN Circuits"})}),"\n",(0,i.jsx)(e.li,{children:(0,i.jsx)(e.a,{href:"https://github.com/vacp2p/zerokit",children:"Zerokit"})}),"\n",(0,i.jsx)(e.li,{children:(0,i.jsx)(e.a,{href:"https://rfc.vac.dev/vac/32/rln-v1",children:"RLN-V1 RFC"})}),"\n",(0,i.jsx)(e.li,{children:(0,i.jsx)(e.a,{href:"https://rfc.vac.dev/vac/raw/rln-v2",children:"RLN-V2 RFC"})}),"\n",(0,i.jsx)(e.li,{children:(0,i.jsx)(e.a,{href:"https://hackmd.io/7cBCMU5hS5OYv8PTaW2wAQ?view",children:"RLN Implementers guide"})}),"\n",(0,i.jsx)(e.li,{children:(0,i.jsx)(e.a,{href:"https://eprint.iacr.org/2016/260.pdf",children:"groth16"})}),"\n",(0,i.jsx)(e.li,{children:(0,i.jsx)(e.a,{href:"https://eprint.iacr.org/2013/879.pdf",children:"bn254"})}),"\n",(0,i.jsx)(e.li,{children:(0,i.jsx)(e.a,{href:"https://eprint.iacr.org/2019/458.pdf",children:"Poseidon Hash"})}),"\n",(0,i.jsx)(e.li,{children:(0,i.jsx)(e.a,{href:"https://github.com/rate-limiting-nullifier/pmtree",children:"Sparse Indexed Merkle Tree"})}),"\n",(0,i.jsx)(e.li,{children:(0,i.jsx)(e.a,{href:"https://doi.org/10.1007/s00145-018-9280-5",children:"Updating key size estimations for pairings"})}),"\n"]})]})}function d(s={}){const{wrapper:e}={...(0,l.R)(),...s.components};return e?(0,i.jsx)(e,{...s,children:(0,i.jsx)(h,{...s})}):h(s)}},70526:(s,e,a)=>{a.d(e,{A:()=>n});const n=a.p+"assets/images/proof_verification_time-c95708ef2a4fc0470114fbceebc6bc30.png"}}]);