mirror of
https://github.com/vacp2p/research.logos.co.git
synced 2026-04-03 03:01:03 -04:00
1 line
62 KiB
JavaScript
1 line
62 KiB
JavaScript
"use strict";(self.webpackChunkresearch_logos_co=self.webpackChunkresearch_logos_co||[]).push([[3239],{28453:(s,e,a)=>{a.d(e,{R:()=>l,x:()=>m});var n=a(96540);const i={},r=n.createContext(i);function l(s){const e=n.useContext(r);return n.useMemo((function(){return"function"==typeof s?s(e):{...e,...s}}),[e,s])}function m(s){let e;return e=s.disableParentContext?"function"==typeof s.components?s.components(i):s.components||i:l(s.components),n.createElement(r.Provider,{value:e},s.children)}},36768:(s,e,a)=>{a.r(e),a.d(e,{assets:()=>c,contentTitle:()=>m,default:()=>t,frontMatter:()=>l,metadata:()=>n,toc:()=>h});var n=a(98885),i=a(74848),r=a(28453);const l={title:"RLN-v3: Towards a Flexible and Cost-Efficient Implementation",date:new Date("2024-05-13T12:00:00.000Z"),authors:"p1ge0nh8er",published:!0,slug:"rln-v3",categories:"research",toc_min_heading_level:2,toc_max_heading_level:4},m=void 0,c={authorsImageUrls:[void 0]},h=[{value:"Introduction",id:"introduction",level:2},{value:"Theory",id:"theory",level:2},{value:"Modification to leaves set in the membership Merkle tree",id:"modification-to-leaves-set-in-the-membership-merkle-tree",level:3},{value:"Modification to circuit inputs",id:"modification-to-circuit-inputs",level:3},{value:"Additional circuit constraints",id:"additional-circuit-constraints",level:3},{value:"Modifications to external epoch validation (Waku, etc.)",id:"modifications-to-external-epoch-validation-waku-etc",level:3},{value:"Modifications to double signaling detection scheme (Waku, etc.)",id:"modifications-to-double-signaling-detection-scheme-waku-etc",level:3},{value:"The implementation",id:"the-implementation",level:2},{value:"Comments on performance",id:"comments-on-performance",level:2},{value:"Proving",id:"proving",level:3},{value:"Verification",id:"verification",level:3},{value:"Conclusion",id:"conclusion",level:2},{value:"Future work",id:"future-work",level:2},{value:"References",id:"references",level:2}];function d(s){const e={a:"a",annotation:"annotation",code:"code",h2:"h2",h3:"h3",li:"li",math:"math",mi:"mi",mn:"mn",mo:"mo",mrow:"mrow",mspace:"mspace",mtext:"mtext",ol:"ol",p:"p",pre:"pre",semantics:"semantics",span:"span",strong:"strong",ul:"ul",...(0,r.R)(),...s.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(e.p,{children:"Improving on the previous version of RLN by allowing dynamic epoch sizes."}),"\n","\n",(0,i.jsx)(e.h2,{id:"introduction",children:"Introduction"}),"\n",(0,i.jsxs)(e.p,{children:["Recommended previous reading: ",(0,i.jsx)(e.a,{href:"https://research.logos.co/rlog/rln-anonymous-dos-prevention",children:"Strengthening Anonymous DoS Prevention with Rate Limiting Nullifiers in Waku"}),"."]}),"\n",(0,i.jsx)(e.p,{children:"The premise of RLN-v3 is to have a variable message rate per variable epoch,\nwhich can be explained in the following way:"}),"\n",(0,i.jsxs)(e.ul,{children:["\n",(0,i.jsxs)(e.li,{children:["\n",(0,i.jsxs)(e.p,{children:[(0,i.jsx)(e.strong,{children:"RLN-v1:"})," \u201cAlice can send 1 message per global epoch\u201d"]}),"\n",(0,i.jsxs)(e.p,{children:["Practically, this is ",(0,i.jsx)(e.code,{children:"1 msg/second"})]}),"\n"]}),"\n",(0,i.jsxs)(e.li,{children:["\n",(0,i.jsxs)(e.p,{children:[(0,i.jsx)(e.strong,{children:"RLN-v2:"})," \u201cAlice can send ",(0,i.jsx)(e.code,{children:"x"})," messages per global epoch\u201d"]}),"\n",(0,i.jsxs)(e.p,{children:["Practically, this is ",(0,i.jsx)(e.code,{children:"x msg/second"})]}),"\n"]}),"\n",(0,i.jsxs)(e.li,{children:["\n",(0,i.jsxs)(e.p,{children:[(0,i.jsx)(e.strong,{children:"RLN-v3:"})," \u201cAlice can send ",(0,i.jsx)(e.code,{children:"x"})," messages within a time interval ",(0,i.jsx)(e.code,{children:"y"})," chosen by herself.\nThe funds she has to pay are affected by both the number of messages and the chosen time interval.\nOther participants can choose different time intervals fitting their specific needs."]}),"\n",(0,i.jsxs)(e.p,{children:["Practically, this is ",(0,i.jsx)(e.code,{children:"x msg/y seconds"})]}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(e.p,{children:"RLN-v3 allows higher flexibility and ease of payment/stake for users who have more predictable usage patterns and therefore,\nmore predictable bandwidth usage on a p2p network (Waku, etc.)."}),"\n",(0,i.jsx)(e.p,{children:"For example:"}),"\n",(0,i.jsxs)(e.ul,{children:["\n",(0,i.jsxs)(e.li,{children:["An AMM that broadcasts bids, asks, and fills over Waku may require a lot of throughput in the smallest epoch possible and hence may register an RLN-v3 membership of ",(0,i.jsx)(e.code,{children:"10000 msg/1 second"}),".\nThey could do this with RLN-v2, too."]}),"\n",(0,i.jsxs)(e.li,{children:["Alice, a casual user of a messaging app built on Waku, who messages maybe 3-4 people infrequently during the day, may register an RLN-v3 membership of ",(0,i.jsx)(e.code,{children:"100 msg/hour"}),",\nwhich would not be possible in RLN-v2 considering the ",(0,i.jsx)(e.code,{children:"global epoch"})," was set to ",(0,i.jsx)(e.code,{children:"1 second"}),".\nWith RLN-v2, Alice would have to register with a membership of ",(0,i.jsx)(e.code,{children:"1 msg/sec"}),",\nwhich would translate to ",(0,i.jsx)(e.code,{children:"3600 msg/hour"}),". This is much higher than her usage and would\nresult in her overpaying to stake into the membership set."]}),"\n",(0,i.jsxs)(e.li,{children:["A sync service built over Waku,\nwhose spec defines that it MUST broadcast a set of public keys every hour,\nmay register an RLN-v3 membership of ",(0,i.jsx)(e.code,{children:"1 msg/hour"}),",\ncutting down the costs to enter the membership set earlier."]}),"\n"]}),"\n",(0,i.jsx)(e.h2,{id:"theory",children:"Theory"}),"\n",(0,i.jsx)(e.h3,{id:"modification-to-leaves-set-in-the-membership-merkle-tree",children:"Modification to leaves set in the membership Merkle tree"}),"\n",(0,i.jsxs)(e.p,{children:["To ensure that a user\u2019s epoch size (",(0,i.jsx)(e.code,{children:"user_epoch_limit"}),") is included within their membership we must modify the user\u2019s commitment/leaf in the tree to contain it.\nA user\u2019s commitment/leaf in the tree is referred to as a ",(0,i.jsx)(e.code,{children:"rate_commitment"}),",\nwhich was previously derived from their public key (",(0,i.jsx)(e.code,{children:"identity_commitment"}),")\nand their variable message rate (",(0,i.jsx)(e.code,{children:"user_message_limit"}),")."]}),"\n",(0,i.jsxs)(e.p,{children:["In ",(0,i.jsx)(e.strong,{children:"RLN-v2:"})]}),"\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:"r"}),(0,i.jsx)(e.mi,{children:"a"}),(0,i.jsx)(e.mi,{children:"t"}),(0,i.jsx)(e.mi,{children:"e"}),(0,i.jsx)(e.mi,{mathvariant:"normal",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.mo,{children:"="}),(0,i.jsx)(e.mi,{children:"p"}),(0,i.jsx)(e.mi,{children:"o"}),(0,i.jsx)(e.mi,{children:"s"}),(0,i.jsx)(e.mi,{children:"e"}),(0,i.jsx)(e.mi,{children:"i"}),(0,i.jsx)(e.mi,{children:"d"}),(0,i.jsx)(e.mi,{children:"o"}),(0,i.jsx)(e.mi,{children:"n"}),(0,i.jsx)(e.mo,{stretchy:"false",children:"("}),(0,i.jsx)(e.mo,{stretchy:"false",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,{mathvariant:"normal",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.mo,{separator:"true",children:","}),(0,i.jsx)(e.mi,{children:"u"}),(0,i.jsx)(e.mi,{children:"s"}),(0,i.jsx)(e.mi,{children:"e"}),(0,i.jsx)(e.mi,{children:"r"}),(0,i.jsx)(e.mi,{mathvariant:"normal",children:"_"}),(0,i.jsx)(e.mi,{children:"m"}),(0,i.jsx)(e.mi,{children:"e"}),(0,i.jsx)(e.mi,{children:"s"}),(0,i.jsx)(e.mi,{children:"s"}),(0,i.jsx)(e.mi,{children:"a"}),(0,i.jsx)(e.mi,{children:"g"}),(0,i.jsx)(e.mi,{children:"e"}),(0,i.jsx)(e.mi,{mathvariant:"normal",children:"_"}),(0,i.jsx)(e.mi,{children:"l"}),(0,i.jsx)(e.mi,{children:"i"}),(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.mo,{stretchy:"false",children:"]"}),(0,i.jsx)(e.mo,{stretchy:"false",children:")"})]}),(0,i.jsx)(e.annotation,{encoding:"application/x-tex",children:"rate\\_commitment = poseidon([identity\\_commitment, user\\_message\\_limit])"})]})})}),(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",style:{marginRight:"0.02778em"},children:"r"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"a"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"t"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"e"}),(0,i.jsx)(e.span,{className:"mord",style:{marginRight:"0.02778em"},children:"_"}),(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:"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.06em",verticalAlign:"-0.31em"}}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"p"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"ose"}),(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:"o"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"n"}),(0,i.jsx)(e.span,{className:"mopen",children:"(["}),(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",style:{marginRight:"0.02778em"},children:"_"}),(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:"mpunct",children:","}),(0,i.jsx)(e.span,{className:"mspace",style:{marginRight:"0.1667em"}}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"u"}),(0,i.jsx)(e.span,{className:"mord mathnormal",style:{marginRight:"0.02778em"},children:"ser"}),(0,i.jsx)(e.span,{className:"mord",style:{marginRight:"0.02778em"},children:"_"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"m"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"ess"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"a"}),(0,i.jsx)(e.span,{className:"mord mathnormal",style:{marginRight:"0.03588em"},children:"g"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"e"}),(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:"imi"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"t"}),(0,i.jsx)(e.span,{className:"mclose",children:"])"})]})]})]})}),"\n",(0,i.jsxs)(e.p,{children:["In ",(0,i.jsx)(e.strong,{children:"RLN-v3:"})]}),"\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:"r"}),(0,i.jsx)(e.mi,{children:"a"}),(0,i.jsx)(e.mi,{children:"t"}),(0,i.jsx)(e.mi,{children:"e"}),(0,i.jsx)(e.mi,{mathvariant:"normal",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.mo,{children:"="}),(0,i.jsx)(e.mi,{children:"p"}),(0,i.jsx)(e.mi,{children:"o"}),(0,i.jsx)(e.mi,{children:"s"}),(0,i.jsx)(e.mi,{children:"e"}),(0,i.jsx)(e.mi,{children:"i"}),(0,i.jsx)(e.mi,{children:"d"}),(0,i.jsx)(e.mi,{children:"o"}),(0,i.jsx)(e.mi,{children:"n"}),(0,i.jsx)(e.mo,{stretchy:"false",children:"("}),(0,i.jsx)(e.mo,{stretchy:"false",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,{mathvariant:"normal",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.mo,{separator:"true",children:","}),(0,i.jsx)(e.mi,{children:"u"}),(0,i.jsx)(e.mi,{children:"s"}),(0,i.jsx)(e.mi,{children:"e"}),(0,i.jsx)(e.mi,{children:"r"}),(0,i.jsx)(e.mi,{mathvariant:"normal",children:"_"}),(0,i.jsx)(e.mi,{children:"m"}),(0,i.jsx)(e.mi,{children:"e"}),(0,i.jsx)(e.mi,{children:"s"}),(0,i.jsx)(e.mi,{children:"s"}),(0,i.jsx)(e.mi,{children:"a"}),(0,i.jsx)(e.mi,{children:"g"}),(0,i.jsx)(e.mi,{children:"e"}),(0,i.jsx)(e.mi,{mathvariant:"normal",children:"_"}),(0,i.jsx)(e.mi,{children:"l"}),(0,i.jsx)(e.mi,{children:"i"}),(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.mo,{separator:"true",children:","}),(0,i.jsx)(e.mi,{children:"u"}),(0,i.jsx)(e.mi,{children:"s"}),(0,i.jsx)(e.mi,{children:"e"}),(0,i.jsx)(e.mi,{children:"r"}),(0,i.jsx)(e.mi,{mathvariant:"normal",children:"_"}),(0,i.jsx)(e.mi,{children:"e"}),(0,i.jsx)(e.mi,{children:"p"}),(0,i.jsx)(e.mi,{children:"o"}),(0,i.jsx)(e.mi,{children:"c"}),(0,i.jsx)(e.mi,{children:"h"}),(0,i.jsx)(e.mi,{mathvariant:"normal",children:"_"}),(0,i.jsx)(e.mi,{children:"l"}),(0,i.jsx)(e.mi,{children:"i"}),(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.mo,{stretchy:"false",children:"]"}),(0,i.jsx)(e.mo,{stretchy:"false",children:")"})]}),(0,i.jsx)(e.annotation,{encoding:"application/x-tex",children:"rate\\_commitment = poseidon([identity\\_commitment, user\\_message\\_limit, user\\_epoch\\_limit])"})]})})}),(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",style:{marginRight:"0.02778em"},children:"r"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"a"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"t"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"e"}),(0,i.jsx)(e.span,{className:"mord",style:{marginRight:"0.02778em"},children:"_"}),(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:"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.06em",verticalAlign:"-0.31em"}}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"p"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"ose"}),(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:"o"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"n"}),(0,i.jsx)(e.span,{className:"mopen",children:"(["}),(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",style:{marginRight:"0.02778em"},children:"_"}),(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:"mpunct",children:","}),(0,i.jsx)(e.span,{className:"mspace",style:{marginRight:"0.1667em"}}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"u"}),(0,i.jsx)(e.span,{className:"mord mathnormal",style:{marginRight:"0.02778em"},children:"ser"}),(0,i.jsx)(e.span,{className:"mord",style:{marginRight:"0.02778em"},children:"_"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"m"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"ess"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"a"}),(0,i.jsx)(e.span,{className:"mord mathnormal",style:{marginRight:"0.03588em"},children:"g"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"e"}),(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:"imi"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"t"}),(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 mathnormal",children:"u"}),(0,i.jsx)(e.span,{className:"mord mathnormal",style:{marginRight:"0.02778em"},children:"ser"}),(0,i.jsx)(e.span,{className:"mord",style:{marginRight:"0.02778em"},children:"_"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"e"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"p"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"oc"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"h"}),(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:"imi"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"t"}),(0,i.jsx)(e.span,{className:"mclose",children:"])"})]})]})]})}),"\n",(0,i.jsx)(e.h3,{id:"modification-to-circuit-inputs",children:"Modification to circuit inputs"}),"\n",(0,i.jsxs)(e.p,{children:["To detect double signaling,\nwe make use of a circuit output ",(0,i.jsx)(e.code,{children:"nullifier"}),",\nwhich remains the same if a user generates a proof with the same ",(0,i.jsx)(e.code,{children:"message_id"})," and ",(0,i.jsx)(e.code,{children:"external_nullifier"}),",\nwhere the ",(0,i.jsx)(e.code,{children:"external_nullifier"})," and ",(0,i.jsx)(e.code,{children:"nullifier"})," are defined as:"]}),"\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:"e"}),(0,i.jsx)(e.mi,{children:"x"}),(0,i.jsx)(e.mi,{children:"t"}),(0,i.jsx)(e.mi,{children:"e"}),(0,i.jsx)(e.mi,{children:"r"}),(0,i.jsx)(e.mi,{children:"n"}),(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:"n"}),(0,i.jsx)(e.mi,{children:"u"}),(0,i.jsx)(e.mi,{children:"l"}),(0,i.jsx)(e.mi,{children:"l"}),(0,i.jsx)(e.mi,{children:"i"}),(0,i.jsx)(e.mi,{children:"f"}),(0,i.jsx)(e.mi,{children:"i"}),(0,i.jsx)(e.mi,{children:"e"}),(0,i.jsx)(e.mi,{children:"r"}),(0,i.jsx)(e.mo,{children:"="}),(0,i.jsx)(e.mi,{children:"p"}),(0,i.jsx)(e.mi,{children:"o"}),(0,i.jsx)(e.mi,{children:"s"}),(0,i.jsx)(e.mi,{children:"e"}),(0,i.jsx)(e.mi,{children:"i"}),(0,i.jsx)(e.mi,{children:"d"}),(0,i.jsx)(e.mi,{children:"o"}),(0,i.jsx)(e.mi,{children:"n"}),(0,i.jsx)(e.mo,{stretchy:"false",children:"("}),(0,i.jsx)(e.mo,{stretchy:"false",children:"["}),(0,i.jsx)(e.mi,{children:"e"}),(0,i.jsx)(e.mi,{children:"p"}),(0,i.jsx)(e.mi,{children:"o"}),(0,i.jsx)(e.mi,{children:"c"}),(0,i.jsx)(e.mi,{children:"h"}),(0,i.jsx)(e.mo,{separator:"true",children:","}),(0,i.jsx)(e.mi,{children:"r"}),(0,i.jsx)(e.mi,{children:"l"}),(0,i.jsx)(e.mi,{children:"n"}),(0,i.jsx)(e.mi,{mathvariant:"normal",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:"f"}),(0,i.jsx)(e.mi,{children:"i"}),(0,i.jsx)(e.mi,{children:"e"}),(0,i.jsx)(e.mi,{children:"r"}),(0,i.jsx)(e.mo,{stretchy:"false",children:"]"}),(0,i.jsx)(e.mo,{stretchy:"false",children:")"}),(0,i.jsx)(e.mspace,{linebreak:"newline"}),(0,i.jsx)(e.mi,{children:"n"}),(0,i.jsx)(e.mi,{children:"u"}),(0,i.jsx)(e.mi,{children:"l"}),(0,i.jsx)(e.mi,{children:"l"}),(0,i.jsx)(e.mi,{children:"i"}),(0,i.jsx)(e.mi,{children:"f"}),(0,i.jsx)(e.mi,{children:"i"}),(0,i.jsx)(e.mi,{children:"e"}),(0,i.jsx)(e.mi,{children:"r"}),(0,i.jsx)(e.mo,{children:"="}),(0,i.jsx)(e.mi,{children:"p"}),(0,i.jsx)(e.mi,{children:"o"}),(0,i.jsx)(e.mi,{children:"s"}),(0,i.jsx)(e.mi,{children:"e"}),(0,i.jsx)(e.mi,{children:"i"}),(0,i.jsx)(e.mi,{children:"d"}),(0,i.jsx)(e.mi,{children:"o"}),(0,i.jsx)(e.mi,{children:"n"}),(0,i.jsx)(e.mo,{stretchy:"false",children:"("}),(0,i.jsx)(e.mo,{stretchy:"false",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,{mathvariant:"normal",children:"_"}),(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,{separator:"true",children:","}),(0,i.jsx)(e.mi,{children:"e"}),(0,i.jsx)(e.mi,{children:"x"}),(0,i.jsx)(e.mi,{children:"t"}),(0,i.jsx)(e.mi,{children:"e"}),(0,i.jsx)(e.mi,{children:"r"}),(0,i.jsx)(e.mi,{children:"n"}),(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:"n"}),(0,i.jsx)(e.mi,{children:"u"}),(0,i.jsx)(e.mi,{children:"l"}),(0,i.jsx)(e.mi,{children:"l"}),(0,i.jsx)(e.mi,{children:"i"}),(0,i.jsx)(e.mi,{children:"f"}),(0,i.jsx)(e.mi,{children:"i"}),(0,i.jsx)(e.mi,{children:"e"}),(0,i.jsx)(e.mi,{children:"r"}),(0,i.jsx)(e.mo,{separator:"true",children:","}),(0,i.jsx)(e.mi,{children:"m"}),(0,i.jsx)(e.mi,{children:"e"}),(0,i.jsx)(e.mi,{children:"s"}),(0,i.jsx)(e.mi,{children:"s"}),(0,i.jsx)(e.mi,{children:"a"}),(0,i.jsx)(e.mi,{children:"g"}),(0,i.jsx)(e.mi,{children:"e"}),(0,i.jsx)(e.mi,{mathvariant:"normal",children:"_"}),(0,i.jsx)(e.mi,{children:"i"}),(0,i.jsx)(e.mi,{children:"d"}),(0,i.jsx)(e.mo,{stretchy:"false",children:"]"}),(0,i.jsx)(e.mo,{stretchy:"false",children:")"})]}),(0,i.jsx)(e.annotation,{encoding:"application/x-tex",children:"external\\_nullifier = poseidon([epoch, rln\\_identifier]) \\\\\nnullifier = poseidon([identity\\_secret, external\\_nullifier, message\\_id])"})]})})}),(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:"1.0044em",verticalAlign:"-0.31em"}}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"e"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"x"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"t"}),(0,i.jsx)(e.span,{className:"mord mathnormal",style:{marginRight:"0.02778em"},children:"er"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"na"}),(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",children:"n"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"u"}),(0,i.jsx)(e.span,{className:"mord mathnormal",style:{marginRight:"0.01968em"},children:"ll"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"i"}),(0,i.jsx)(e.span,{className:"mord mathnormal",style:{marginRight:"0.10764em"},children:"f"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"i"}),(0,i.jsx)(e.span,{className:"mord mathnormal",style:{marginRight:"0.02778em"},children:"er"}),(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.06em",verticalAlign:"-0.31em"}}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"p"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"ose"}),(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:"o"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"n"}),(0,i.jsx)(e.span,{className:"mopen",children:"(["}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"e"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"p"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"oc"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"h"}),(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 mathnormal",style:{marginRight:"0.02778em"},children:"r"}),(0,i.jsx)(e.span,{className:"mord mathnormal",style:{marginRight:"0.01968em"},children:"l"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"n"}),(0,i.jsx)(e.span,{className:"mord",style:{marginRight:"0.02778em"},children:"_"}),(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",style:{marginRight:"0.10764em"},children:"f"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"i"}),(0,i.jsx)(e.span,{className:"mord mathnormal",style:{marginRight:"0.02778em"},children:"er"}),(0,i.jsx)(e.span,{className:"mclose",children:"])"})]}),(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.8889em",verticalAlign:"-0.1944em"}}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"n"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"u"}),(0,i.jsx)(e.span,{className:"mord mathnormal",style:{marginRight:"0.01968em"},children:"ll"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"i"}),(0,i.jsx)(e.span,{className:"mord mathnormal",style:{marginRight:"0.10764em"},children:"f"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"i"}),(0,i.jsx)(e.span,{className:"mord mathnormal",style:{marginRight:"0.02778em"},children:"er"}),(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.06em",verticalAlign:"-0.31em"}}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"p"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"ose"}),(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:"o"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"n"}),(0,i.jsx)(e.span,{className:"mopen",children:"(["}),(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",style:{marginRight:"0.02778em"},children:"_"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"secre"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"t"}),(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 mathnormal",children:"e"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"x"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"t"}),(0,i.jsx)(e.span,{className:"mord mathnormal",style:{marginRight:"0.02778em"},children:"er"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"na"}),(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",children:"n"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"u"}),(0,i.jsx)(e.span,{className:"mord mathnormal",style:{marginRight:"0.01968em"},children:"ll"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"i"}),(0,i.jsx)(e.span,{className:"mord mathnormal",style:{marginRight:"0.10764em"},children:"f"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"i"}),(0,i.jsx)(e.span,{className:"mord mathnormal",style:{marginRight:"0.02778em"},children:"er"}),(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 mathnormal",children:"m"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"ess"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"a"}),(0,i.jsx)(e.span,{className:"mord mathnormal",style:{marginRight:"0.03588em"},children:"g"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"e"}),(0,i.jsx)(e.span,{className:"mord",style:{marginRight:"0.02778em"},children:"_"}),(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:"mclose",children:"])"})]})]})]})}),"\n",(0,i.jsx)(e.p,{children:"Where:"}),"\n",(0,i.jsxs)(e.ul,{children:["\n",(0,i.jsxs)(e.li,{children:[(0,i.jsx)(e.code,{children:"epoch"})," is defined as the Unix epoch timestamp with seconds precision."]}),"\n",(0,i.jsxs)(e.li,{children:[(0,i.jsx)(e.code,{children:"rln_identifier"})," uniquely identifies an application for which a user submits a proof."]}),"\n",(0,i.jsxs)(e.li,{children:[(0,i.jsx)(e.code,{children:"identity_secret"})," is the private key of the user."]}),"\n",(0,i.jsxs)(e.li,{children:[(0,i.jsx)(e.code,{children:"message_id"})," is the sequence number of the user\u2019s message within ",(0,i.jsx)(e.code,{children:"user_message_limit"})," in an epoch."]}),"\n"]}),"\n",(0,i.jsx)(e.p,{children:"In RLN-v2, the global epoch was 1 second,\nhence we did not need to perform any assertions to the epoch\u2019s value inside the circuit,\nand the validation of the epoch was handled off-circuit (i.e., too old, too large, bad values, etc.)."}),"\n",(0,i.jsxs)(e.p,{children:["In RLN-v3, we propose that the ",(0,i.jsx)(e.code,{children:"epoch"})," that is passed into the circuit\nmust be a valid multiple of ",(0,i.jsx)(e.code,{children:"user_epoch_limit"}),"\nsince the user may pass in values of the ",(0,i.jsx)(e.code,{children:"epoch"})," which do not directly correlate with the ",(0,i.jsx)(e.code,{children:"user_epoch_limit"}),"."]}),"\n",(0,i.jsx)(e.p,{children:"For example:"}),"\n",(0,i.jsxs)(e.ul,{children:["\n",(0,i.jsxs)(e.li,{children:["A user with ",(0,i.jsx)(e.code,{children:"user_epoch_limit"})," of 120\npasses in an epoch of ",(0,i.jsx)(e.code,{children:"237"}),"\ngenerates ",(0,i.jsx)(e.code,{children:"user_message_limit"})," proofs with it,\ncan increment the epoch by ",(0,i.jsx)(e.code,{children:"1"}),",\nand generate ",(0,i.jsx)(e.code,{children:"user_message_limit"})," proofs with it,\nthereby allowing them to bypass the message per epoch restriction."]}),"\n"]}),"\n",(0,i.jsxs)(e.p,{children:["One could say that we could perform this validation outside of the circuit,\nbut we maintain the ",(0,i.jsx)(e.code,{children:"user_epoch_limit"})," as a private input to the circuit so that the user is not deanonymized by the anonymity set connected to that ",(0,i.jsx)(e.code,{children:"user_epoch_limit"}),".\nSince ",(0,i.jsx)(e.code,{children:"user_epoch_limit"})," is kept private,\nthe verifier does not have access to that value and cannot perform validation on it."]}),"\n",(0,i.jsxs)(e.p,{children:["If we ensure that the ",(0,i.jsx)(e.code,{children:"epoch"})," is a multiple of ",(0,i.jsx)(e.code,{children:"user_epoch_limit"}),",\nwe have the following scenarios:"]}),"\n",(0,i.jsxs)(e.ul,{children:["\n",(0,i.jsxs)(e.li,{children:["A user with ",(0,i.jsx)(e.code,{children:"user_epoch_limit"})," of 120\npasses in an epoch of ",(0,i.jsx)(e.code,{children:"237"}),".\nProof generation fails since the epoch is not a multiple of ",(0,i.jsx)(e.code,{children:"user_epoch_limit"}),"."]}),"\n",(0,i.jsxs)(e.li,{children:["A user with ",(0,i.jsx)(e.code,{children:"user_epoch_limit"})," of 120\npasses in an epoch of ",(0,i.jsx)(e.code,{children:"240"})," and\ncan generate ",(0,i.jsx)(e.code,{children:"user_message_limit"})," proofs without being slashed."]}),"\n"]}),"\n",(0,i.jsxs)(e.p,{children:["Since we perform operations on the ",(0,i.jsx)(e.code,{children:"epoch"}),", we must include it as a circuit input (previously, it was removed from the circuit inputs to RLN-v2)."]}),"\n",(0,i.jsx)(e.p,{children:"Therefore, the new circuit inputs are as follows:"}),"\n",(0,i.jsx)(e.pre,{children:(0,i.jsx)(e.code,{className:"language-c",children:"// unchanged\nprivate identity_secret\nprivate user_message_limit\nprivate message_id\nprivate pathElements[]\nprivate pathIndices[]\npublic x // messageHash\n\n// new/changed\nprivate user_epoch_limit\nprivate user_epoch_quotient // epoch/user_epoch_limit to assert within circuit\npublic epoch\npublic rln_identifier\n"})}),"\n",(0,i.jsx)(e.p,{children:"The circuit outputs remain the same."}),"\n",(0,i.jsx)(e.h3,{id:"additional-circuit-constraints",children:"Additional circuit constraints"}),"\n",(0,i.jsxs)(e.ol,{children:["\n",(0,i.jsxs)(e.li,{children:["\n",(0,i.jsxs)(e.p,{children:["Since we accept the ",(0,i.jsx)(e.code,{children:"epoch"}),", ",(0,i.jsx)(e.code,{children:"user_epoch_quotient"}),", and ",(0,i.jsx)(e.code,{children:"user_epoch_limit"}),",\nwe must ensure that the relation between these 3 values is preserved. I.e.:"]}),"\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:"e"}),(0,i.jsx)(e.mi,{children:"p"}),(0,i.jsx)(e.mi,{children:"o"}),(0,i.jsx)(e.mi,{children:"c"}),(0,i.jsx)(e.mi,{children:"h"}),(0,i.jsx)(e.mo,{children:"="}),(0,i.jsx)(e.mo,{children:"="}),(0,i.jsx)(e.mi,{children:"u"}),(0,i.jsx)(e.mi,{children:"s"}),(0,i.jsx)(e.mi,{children:"e"}),(0,i.jsx)(e.mi,{children:"r"}),(0,i.jsx)(e.mi,{mathvariant:"normal",children:"_"}),(0,i.jsx)(e.mi,{children:"e"}),(0,i.jsx)(e.mi,{children:"p"}),(0,i.jsx)(e.mi,{children:"o"}),(0,i.jsx)(e.mi,{children:"c"}),(0,i.jsx)(e.mi,{children:"h"}),(0,i.jsx)(e.mi,{mathvariant:"normal",children:"_"}),(0,i.jsx)(e.mi,{children:"l"}),(0,i.jsx)(e.mi,{children:"i"}),(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.mo,{children:"\u2217"}),(0,i.jsx)(e.mi,{children:"u"}),(0,i.jsx)(e.mi,{children:"s"}),(0,i.jsx)(e.mi,{children:"e"}),(0,i.jsx)(e.mi,{children:"r"}),(0,i.jsx)(e.mi,{mathvariant:"normal",children:"_"}),(0,i.jsx)(e.mi,{children:"e"}),(0,i.jsx)(e.mi,{children:"p"}),(0,i.jsx)(e.mi,{children:"o"}),(0,i.jsx)(e.mi,{children:"c"}),(0,i.jsx)(e.mi,{children:"h"}),(0,i.jsx)(e.mi,{mathvariant:"normal",children:"_"}),(0,i.jsx)(e.mi,{children:"q"}),(0,i.jsx)(e.mi,{children:"u"}),(0,i.jsx)(e.mi,{children:"o"}),(0,i.jsx)(e.mi,{children:"t"}),(0,i.jsx)(e.mi,{children:"i"}),(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.annotation,{encoding:"application/x-tex",children:"epoch == user\\_epoch\\_limit * user\\_epoch\\_quotient"})]})})}),(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:"e"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"p"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"oc"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"h"}),(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:"u"}),(0,i.jsx)(e.span,{className:"mord mathnormal",style:{marginRight:"0.02778em"},children:"ser"}),(0,i.jsx)(e.span,{className:"mord",style:{marginRight:"0.02778em"},children:"_"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"e"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"p"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"oc"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"h"}),(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:"imi"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"t"}),(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:"1.0044em",verticalAlign:"-0.31em"}}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"u"}),(0,i.jsx)(e.span,{className:"mord mathnormal",style:{marginRight:"0.02778em"},children:"ser"}),(0,i.jsx)(e.span,{className:"mord",style:{marginRight:"0.02778em"},children:"_"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"e"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"p"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"oc"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"h"}),(0,i.jsx)(e.span,{className:"mord",style:{marginRight:"0.02778em"},children:"_"}),(0,i.jsx)(e.span,{className:"mord mathnormal",style:{marginRight:"0.03588em"},children:"q"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"u"}),(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:"i"}),(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"})]})]})]})}),"\n"]}),"\n",(0,i.jsxs)(e.li,{children:["\n",(0,i.jsxs)(e.p,{children:["To ensure no overflows/underflows occur in the above multiplication,\nwe must constrain the inputs of ",(0,i.jsx)(e.code,{children:"epoch"}),", ",(0,i.jsx)(e.code,{children:"user_epoch_quotient"}),", and ",(0,i.jsx)(e.code,{children:"user_epoch_limit"}),".\nWe have assumed ",(0,i.jsx)(e.code,{children:"3600"})," to be the maximum valid size of the ",(0,i.jsx)(e.code,{children:"user_epoch_quotient"}),"."]}),"\n"]}),"\n"]}),"\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:"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,{stretchy:"false",children:"("}),(0,i.jsx)(e.mi,{children:"e"}),(0,i.jsx)(e.mi,{children:"p"}),(0,i.jsx)(e.mi,{children:"o"}),(0,i.jsx)(e.mi,{children:"c"}),(0,i.jsx)(e.mi,{children:"h"}),(0,i.jsx)(e.mo,{stretchy:"false",children:")"}),(0,i.jsx)(e.mo,{children:"\u2264"}),(0,i.jsx)(e.mn,{children:"64"}),(0,i.jsx)(e.mtext,{children:"\xa0"}),(0,i.jsx)(e.mi,{children:"b"}),(0,i.jsx)(e.mi,{children:"i"}),(0,i.jsx)(e.mi,{children:"t"}),(0,i.jsx)(e.mi,{children:"s"}),(0,i.jsx)(e.mspace,{linebreak:"newline"}),(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,{stretchy:"false",children:"("}),(0,i.jsx)(e.mi,{children:"u"}),(0,i.jsx)(e.mi,{children:"s"}),(0,i.jsx)(e.mi,{children:"e"}),(0,i.jsx)(e.mi,{children:"r"}),(0,i.jsx)(e.mi,{mathvariant:"normal",children:"_"}),(0,i.jsx)(e.mi,{children:"e"}),(0,i.jsx)(e.mi,{children:"p"}),(0,i.jsx)(e.mi,{children:"o"}),(0,i.jsx)(e.mi,{children:"c"}),(0,i.jsx)(e.mi,{children:"h"}),(0,i.jsx)(e.mi,{mathvariant:"normal",children:"_"}),(0,i.jsx)(e.mi,{children:"l"}),(0,i.jsx)(e.mi,{children:"i"}),(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.mo,{stretchy:"false",children:")"}),(0,i.jsx)(e.mo,{children:"\u2264"}),(0,i.jsx)(e.mn,{children:"12"}),(0,i.jsx)(e.mtext,{children:"\xa0"}),(0,i.jsx)(e.mi,{children:"b"}),(0,i.jsx)(e.mi,{children:"i"}),(0,i.jsx)(e.mi,{children:"t"}),(0,i.jsx)(e.mi,{children:"s"}),(0,i.jsx)(e.mspace,{linebreak:"newline"}),(0,i.jsx)(e.mi,{children:"u"}),(0,i.jsx)(e.mi,{children:"s"}),(0,i.jsx)(e.mi,{children:"e"}),(0,i.jsx)(e.mi,{children:"r"}),(0,i.jsx)(e.mi,{mathvariant:"normal",children:"_"}),(0,i.jsx)(e.mi,{children:"e"}),(0,i.jsx)(e.mi,{children:"p"}),(0,i.jsx)(e.mi,{children:"o"}),(0,i.jsx)(e.mi,{children:"c"}),(0,i.jsx)(e.mi,{children:"h"}),(0,i.jsx)(e.mi,{mathvariant:"normal",children:"_"}),(0,i.jsx)(e.mi,{children:"l"}),(0,i.jsx)(e.mi,{children:"i"}),(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.mo,{children:"\u2264"}),(0,i.jsx)(e.mn,{children:"3600"}),(0,i.jsx)(e.mspace,{linebreak:"newline"}),(0,i.jsx)(e.mi,{children:"u"}),(0,i.jsx)(e.mi,{children:"s"}),(0,i.jsx)(e.mi,{children:"e"}),(0,i.jsx)(e.mi,{children:"r"}),(0,i.jsx)(e.mi,{mathvariant:"normal",children:"_"}),(0,i.jsx)(e.mi,{children:"e"}),(0,i.jsx)(e.mi,{children:"p"}),(0,i.jsx)(e.mi,{children:"o"}),(0,i.jsx)(e.mi,{children:"c"}),(0,i.jsx)(e.mi,{children:"h"}),(0,i.jsx)(e.mi,{mathvariant:"normal",children:"_"}),(0,i.jsx)(e.mi,{children:"l"}),(0,i.jsx)(e.mi,{children:"i"}),(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.mo,{children:"\u2264"}),(0,i.jsx)(e.mi,{children:"e"}),(0,i.jsx)(e.mi,{children:"p"}),(0,i.jsx)(e.mi,{children:"o"}),(0,i.jsx)(e.mi,{children:"c"}),(0,i.jsx)(e.mi,{children:"h"}),(0,i.jsx)(e.mspace,{linebreak:"newline"}),(0,i.jsx)(e.mi,{children:"u"}),(0,i.jsx)(e.mi,{children:"s"}),(0,i.jsx)(e.mi,{children:"e"}),(0,i.jsx)(e.mi,{children:"r"}),(0,i.jsx)(e.mi,{mathvariant:"normal",children:"_"}),(0,i.jsx)(e.mi,{children:"e"}),(0,i.jsx)(e.mi,{children:"p"}),(0,i.jsx)(e.mi,{children:"o"}),(0,i.jsx)(e.mi,{children:"c"}),(0,i.jsx)(e.mi,{children:"h"}),(0,i.jsx)(e.mi,{mathvariant:"normal",children:"_"}),(0,i.jsx)(e.mi,{children:"q"}),(0,i.jsx)(e.mi,{children:"u"}),(0,i.jsx)(e.mi,{children:"o"}),(0,i.jsx)(e.mi,{children:"t"}),(0,i.jsx)(e.mi,{children:"i"}),(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.mo,{children:"<"}),(0,i.jsx)(e.mi,{children:"u"}),(0,i.jsx)(e.mi,{children:"s"}),(0,i.jsx)(e.mi,{children:"e"}),(0,i.jsx)(e.mi,{children:"r"}),(0,i.jsx)(e.mi,{mathvariant:"normal",children:"_"}),(0,i.jsx)(e.mi,{children:"e"}),(0,i.jsx)(e.mi,{children:"p"}),(0,i.jsx)(e.mi,{children:"o"}),(0,i.jsx)(e.mi,{children:"c"}),(0,i.jsx)(e.mi,{children:"h"}),(0,i.jsx)(e.mi,{mathvariant:"normal",children:"_"}),(0,i.jsx)(e.mi,{children:"l"}),(0,i.jsx)(e.mi,{children:"i"}),(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.annotation,{encoding:"application/x-tex",children:"size(epoch) \\leq 64\\ bits \\\\\nsize(user\\_epoch\\_limit) \\leq 12\\ bits \\\\\nuser\\_epoch\\_limit \\leq 3600 \\\\\nuser\\_epoch\\_limit \\leq epoch \\\\\nuser\\_epoch\\_quotient < user\\_epoch\\_limit"})]})})}),(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:"1em",verticalAlign:"-0.25em"}}),(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:"mopen",children:"("}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"e"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"p"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"oc"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"h"}),(0,i.jsx)(e.span,{className:"mclose",children:")"}),(0,i.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2778em"}}),(0,i.jsx)(e.span,{className:"mrel",children:"\u2264"}),(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.6944em"}}),(0,i.jsx)(e.span,{className:"mord",children:"64"}),(0,i.jsx)(e.span,{className:"mspace",children:"\xa0"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"bi"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"t"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"s"})]}),(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.06em",verticalAlign:"-0.31em"}}),(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:"mopen",children:"("}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"u"}),(0,i.jsx)(e.span,{className:"mord mathnormal",style:{marginRight:"0.02778em"},children:"ser"}),(0,i.jsx)(e.span,{className:"mord",style:{marginRight:"0.02778em"},children:"_"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"e"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"p"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"oc"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"h"}),(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:"imi"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"t"}),(0,i.jsx)(e.span,{className:"mclose",children:")"}),(0,i.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2778em"}}),(0,i.jsx)(e.span,{className:"mrel",children:"\u2264"}),(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.6944em"}}),(0,i.jsx)(e.span,{className:"mord",children:"12"}),(0,i.jsx)(e.span,{className:"mspace",children:"\xa0"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"bi"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"t"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"s"})]}),(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:"u"}),(0,i.jsx)(e.span,{className:"mord mathnormal",style:{marginRight:"0.02778em"},children:"ser"}),(0,i.jsx)(e.span,{className:"mord",style:{marginRight:"0.02778em"},children:"_"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"e"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"p"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"oc"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"h"}),(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:"imi"}),(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:"\u2264"}),(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:"3600"})]}),(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:"u"}),(0,i.jsx)(e.span,{className:"mord mathnormal",style:{marginRight:"0.02778em"},children:"ser"}),(0,i.jsx)(e.span,{className:"mord",style:{marginRight:"0.02778em"},children:"_"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"e"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"p"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"oc"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"h"}),(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:"imi"}),(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:"\u2264"}),(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 mathnormal",children:"e"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"p"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"oc"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"h"})]}),(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:"u"}),(0,i.jsx)(e.span,{className:"mord mathnormal",style:{marginRight:"0.02778em"},children:"ser"}),(0,i.jsx)(e.span,{className:"mord",style:{marginRight:"0.02778em"},children:"_"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"e"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"p"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"oc"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"h"}),(0,i.jsx)(e.span,{className:"mord",style:{marginRight:"0.02778em"},children:"_"}),(0,i.jsx)(e.span,{className:"mord mathnormal",style:{marginRight:"0.03588em"},children:"q"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"u"}),(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:"i"}),(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:"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:"u"}),(0,i.jsx)(e.span,{className:"mord mathnormal",style:{marginRight:"0.02778em"},children:"ser"}),(0,i.jsx)(e.span,{className:"mord",style:{marginRight:"0.02778em"},children:"_"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"e"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"p"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"oc"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"h"}),(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:"imi"}),(0,i.jsx)(e.span,{className:"mord mathnormal",children:"t"})]})]})]})}),"\n",(0,i.jsx)(e.h3,{id:"modifications-to-external-epoch-validation-waku-etc",children:"Modifications to external epoch validation (Waku, etc.)"}),"\n",(0,i.jsxs)(e.p,{children:["For receivers of an RLN-v3 proof\nto detect if a message is too old, we must use the higher bound of the ",(0,i.jsx)(e.code,{children:"user_epoch_limit"}),", which has been set to ",(0,i.jsx)(e.code,{children:"3600"}),".\nThe ",(0,i.jsx)(e.strong,{children:"trade-off"})," here is that we allow hour-old messages to propagate within the network."]}),"\n",(0,i.jsx)(e.h3,{id:"modifications-to-double-signaling-detection-scheme-waku-etc",children:"Modifications to double signaling detection scheme (Waku, etc.)"}),"\n",(0,i.jsx)(e.p,{children:"For verifiers of RLN-v1/v2 proofs,\na log of nullifiers seen in the last epoch is maintained,\nand if there is a match with a pre-existing nullifier,\ndouble signaling has been detected and the verifier MAY proceed to slash the spamming user."}),"\n",(0,i.jsxs)(e.p,{children:["With the RLN-v3 scheme,\nwe need to increase the size of the nullifier log used,\nwhich previously cleared itself every second to the higher bound of the ",(0,i.jsx)(e.code,{children:"user_epoch_limit"}),", which is ",(0,i.jsx)(e.code,{children:"3600"}),".\nNow, the RLN proof verifier must clear the nullifier log every ",(0,i.jsx)(e.code,{children:"3600"})," seconds to satisfactorily detect double signaling."]}),"\n",(0,i.jsx)(e.h2,{id:"the-implementation",children:"The implementation"}),"\n",(0,i.jsxs)(e.p,{children:["An implementation of the RLN-v3 scheme in ",(0,i.jsx)(e.a,{href:"https://docs.gnark.consensys.io/",children:"gnark"})," can be found ",(0,i.jsx)(e.a,{href:"https://github.com/vacp2p/gnark-rln/blob/9b05eddc89901a06d8f41b093ce8ce12fd0bb4e0/rln/rln.go",children:"here"}),"."]}),"\n",(0,i.jsx)(e.h2,{id:"comments-on-performance",children:"Comments on performance"}),"\n",(0,i.jsxs)(e.ul,{children:["\n",(0,i.jsx)(e.li,{children:"Hardware: Macbook Air M2, 16GB RAM"}),"\n",(0,i.jsxs)(e.li,{children:["Circuit: ",(0,i.jsx)(e.a,{href:"https://github.com/vacp2p/gnark-rln/blob/9b05eddc89901a06d8f41b093ce8ce12fd0bb4e0/rln/rln.go",children:"RLN-v3"})]}),"\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:["Framework: ",(0,i.jsx)(e.a,{href:"https://docs.gnark.consensys.io/",children:(0,i.jsx)(e.code,{children:"gnark"})})]}),"\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"]}),"\n",(0,i.jsx)(e.h3,{id:"proving",children:"Proving"}),"\n",(0,i.jsxs)(e.p,{children:["The proving time for the RLN-v3 circuit is ",(0,i.jsx)(e.code,{children:"90ms"})," for a single proof."]}),"\n",(0,i.jsx)(e.h3,{id:"verification",children:"Verification"}),"\n",(0,i.jsxs)(e.p,{children:["The verification time for the RLN-v3 circuit is ",(0,i.jsx)(e.code,{children:"1.7ms"})," for a single proof."]}),"\n",(0,i.jsx)(e.h2,{id:"conclusion",children:"Conclusion"}),"\n",(0,i.jsx)(e.p,{children:"The RLN-v3 scheme introduces a new epoch-based message rate-limiting scheme to the RLN protocol.\nIt enhances the user's flexibility in setting their message limits and cost-optimizes their stake."}),"\n",(0,i.jsx)(e.h2,{id:"future-work",children:"Future work"}),"\n",(0,i.jsxs)(e.ul,{children:["\n",(0,i.jsxs)(e.li,{children:["Implementing the RLN-v3 scheme in ",(0,i.jsx)(e.a,{href:"https://github.com/vacp2p/zerokit",children:"Zerokit"})]}),"\n",(0,i.jsxs)(e.li,{children:["Implementing the RLN-v3 scheme in ",(0,i.jsx)(e.a,{href:"https://github.com/waku-org/nwaku",children:"Waku"})]}),"\n",(0,i.jsx)(e.li,{children:"Formal security analysis of the RLN-v3 scheme"}),"\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://research.logos.co/rlog/rln-anonymous-dos-prevention",children:"Strengthening Anonymous DoS Prevention with Rate Limiting Nullifiers in Waku"})}),"\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://eprint.iacr.org/2016/260.pdf",children:"Groth16"})}),"\n",(0,i.jsx)(e.li,{children:(0,i.jsx)(e.a,{href:"https://docs.gnark.consensys.io/",children:"Gnark"})}),"\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/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://waku.org",children:"Waku"})}),"\n"]})]})}function t(s={}){const{wrapper:e}={...(0,r.R)(),...s.components};return e?(0,i.jsx)(e,{...s,children:(0,i.jsx)(d,{...s})}):d(s)}},98885:s=>{s.exports=JSON.parse('{"permalink":"/rlog/rln-v3","source":"@site/rlog/2024-05-13-rln-v3.mdx","title":"RLN-v3: Towards a Flexible and Cost-Efficient Implementation","description":"Improving on the previous version of RLN by allowing dynamic epoch sizes.","date":"2024-05-13T12:00:00.000Z","tags":[],"readingTime":6.32,"hasTruncateMarker":true,"authors":[{"name":"Aaryamann","twitter":"p1ge0nh8er","github":"rymnc","key":"p1ge0nh8er","page":null}],"frontMatter":{"title":"RLN-v3: Towards a Flexible and Cost-Efficient Implementation","date":"2024-05-13T12:00:00.000Z","authors":"p1ge0nh8er","published":true,"slug":"rln-v3","categories":"research","toc_min_heading_level":2,"toc_max_heading_level":4},"unlisted":false,"prevItem":{"title":"Vac 101: Membership with Bloom Filters and Cuckoo Filters","permalink":"/rlog/vac101-membership-with-bloom-filters-and-cuckoo-filters"},"nextItem":{"title":"Verifying RLN Proofs in Light Clients with Subtrees","permalink":"/rlog/rln-light-verifiers"}}')}}]); |