arnaucube
arnaucube/davinci-paperPublic Self-hosted repository
wip circuits + trees
bellesmarta belles.mm@gmail.com
Fri, 18 Jul 2025 00:46:43 +0200
commit

0b1b0290b0f9d340df534116d0ecfe07576fbd79

parent

48b774e037d506f637beec20bd3cc6a9cae162f4

M v2/build/preamble-macros.tex → v2/build/preamble-macros.tex

@@ -84,12 +84,18 @@ \renewcommand{\root}[1][]{\sf{root}^{\sf{#1}}}

\newcommand{\recentroots}{\sf{recentRoots}} \newcommand{\leaf}{\sf{leaf}} \newcommand{\leaves}{\sf{leaves}} +\newcommand{\MTGenerate}{\sf{Generate}} \newcommand{\MTRoot}{\sf{Root}} \newcommand{\MTInsert}{\sf{Insert}} \newcommand{\MTProof}{\sf{Proof}} +\newcommand{\MTMembershipProof}{\sf{MembershipProof}} +\newcommand{\MTNonMembershipProof}{\sf{NonMembershipProof}} \newcommand{\MTRemove}{\sf{Remove}} \newcommand{\MTOpen}{\sf{Open}} +\newcommand{\MTUpdate}{\sf{Update}} \newcommand{\MTVerify}{\sf{Verify}} +\newcommand{\censusTree}{\sf{MT^{\census}}} +\newcommand{\stateTree}{\sf{MT^{\state}}} % Circuits \newcommand{\public}{{\sf\color{teal}public}\xspace}

@@ -118,6 +124,7 @@ \newcommand{\costexponent}{\ballotstyle{costExponent}}

% Voting protocol \newcommand{\variablestyle}[1]{\texttt{#1}\xspace} +\newcommand{\census}{\variablestyle{census}} \newcommand{\censusdata}{\variablestyle{censusData}} \newcommand{\voteproof}{\variablestyle{voteProof}} \newcommand{\censusproof}{\variablestyle{censusProof}}

@@ -136,11 +143,14 @@ \newcommand{\address}{\variablestyle{address}}

% State Merkle tree \newcommand{\censusroot}{\variablestyle{censusRoot}} +\newcommand{\stateroot}{\variablestyle{stateRoot}} \newcommand{\type}{\variablestyle{type}} +%\newcommand{\path}{\variablestyle{path}} +\newcommand{\state}{\variablestyle{state}} \newcommand{\ballotmode}{\variablestyle{ballotMode}} \newcommand{\epk}{\variablestyle{encryptionKey}} -\newcommand{\addaccumulator}{\variablestyle{addedResultsAccumulator}} -\newcommand{\substractaccumulator}{\variablestyle{substractResultsAccumulator}} +\newcommand{\addaccumulator}{\variablestyle{resultsAdd}} +\newcommand{\substractaccumulator}{\variablestyle{resultsSub}} \newcommand{\addresses}{\variablestyle{addresses}} \newcommand{\nullifiers}{\variablestyle{nullifiers}} \newcommand{\weight}{\variablestyle{weight}}
A v2/figures/circuits-flow.drawio

@@ -0,0 +1,354 @@

+<mxfile host="app.diagrams.net" agent="Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:138.0) Gecko/20100101 Firefox/138.0" version="28.0.5" pages="4"> + <diagram name="circuits-flow" id="_vTFH3AuZL-kwKrDdQY0"> + <mxGraphModel dx="1676" dy="724" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="850" pageHeight="1100" math="0" shadow="0"> + <root> + <mxCell id="GHgeBMR-SrvCu2a6oZFm-0" /> + <mxCell id="GHgeBMR-SrvCu2a6oZFm-1" parent="GHgeBMR-SrvCu2a6oZFm-0" /> + <mxCell id="GHgeBMR-SrvCu2a6oZFm-2" value="" style="group;fillColor=#d5e8d4;strokeColor=#82b366;container=0;" vertex="1" connectable="0" parent="GHgeBMR-SrvCu2a6oZFm-1"> + <mxGeometry x="100" y="50" width="260" height="170" as="geometry" /> + </mxCell> + <mxCell id="GHgeBMR-SrvCu2a6oZFm-3" value="" style="group;fillColor=#e1d5e7;strokeColor=#9673a6;container=0;" vertex="1" connectable="0" parent="GHgeBMR-SrvCu2a6oZFm-1"> + <mxGeometry x="420" y="50" width="820" height="170" as="geometry" /> + </mxCell> + <mxCell id="GHgeBMR-SrvCu2a6oZFm-4" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="GHgeBMR-SrvCu2a6oZFm-1" source="GHgeBMR-SrvCu2a6oZFm-5" target="GHgeBMR-SrvCu2a6oZFm-8"> + <mxGeometry relative="1" as="geometry" /> + </mxCell> + <mxCell id="GHgeBMR-SrvCu2a6oZFm-5" value="&lt;div align=&quot;center&quot;&gt;&lt;font style=&quot;font-size: 12px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;b&gt;ballotCircuit&lt;/b&gt;&lt;/font&gt;&lt;/div&gt;&lt;ul&gt;&lt;li align=&quot;left&quot;&gt;&lt;b&gt;proof system&lt;/b&gt;: Groth16&lt;/li&gt;&lt;li align=&quot;left&quot;&gt;&lt;b&gt;elliptic curve&lt;/b&gt;: BN254&lt;/li&gt;&lt;li align=&quot;left&quot;&gt;&lt;font style=&quot;font-size: 12px;&quot;&gt;&lt;b&gt;software&lt;/b&gt;: circom&lt;/font&gt;&lt;/li&gt;&lt;/ul&gt;" style="rounded=0;whiteSpace=wrap;html=1;fontFamily=Courier New;fillColor=#f5f5f5;fontColor=#333333;strokeColor=#666666;align=left;spacingLeft=-16;spacingBottom=-11;" vertex="1" parent="GHgeBMR-SrvCu2a6oZFm-1"> + <mxGeometry x="120" y="100" width="220" height="100" as="geometry" /> + </mxCell> + <mxCell id="GHgeBMR-SrvCu2a6oZFm-6" value="1" style="whiteSpace=wrap;html=1;aspect=fixed;" vertex="1" parent="GHgeBMR-SrvCu2a6oZFm-1"> + <mxGeometry x="120" y="100" width="20" height="20" as="geometry" /> + </mxCell> + <mxCell id="GHgeBMR-SrvCu2a6oZFm-7" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="GHgeBMR-SrvCu2a6oZFm-1" source="GHgeBMR-SrvCu2a6oZFm-8" target="GHgeBMR-SrvCu2a6oZFm-10"> + <mxGeometry relative="1" as="geometry" /> + </mxCell> + <mxCell id="GHgeBMR-SrvCu2a6oZFm-8" value="&lt;div align=&quot;center&quot;&gt;&lt;font style=&quot;font-size: 12px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;b&gt;verifierCircuit&lt;/b&gt;&lt;/font&gt;&lt;/div&gt;&lt;ul&gt;&lt;li align=&quot;left&quot;&gt;&lt;b&gt;proof system&lt;/b&gt;: Groth16&lt;/li&gt;&lt;li align=&quot;left&quot;&gt;&lt;b&gt;elliptic curve&lt;/b&gt;: BLS12-377&lt;/li&gt;&lt;li align=&quot;left&quot;&gt;&lt;font style=&quot;font-size: 12px;&quot;&gt;&lt;b&gt;software&lt;/b&gt;: gnark&lt;/font&gt;&lt;/li&gt;&lt;/ul&gt;" style="rounded=0;whiteSpace=wrap;html=1;fontFamily=Courier New;fillColor=#f5f5f5;fontColor=#333333;strokeColor=#666666;align=left;spacingLeft=-16;spacingBottom=-11;" vertex="1" parent="GHgeBMR-SrvCu2a6oZFm-1"> + <mxGeometry x="440" y="100" width="220" height="100" as="geometry" /> + </mxCell> + <mxCell id="GHgeBMR-SrvCu2a6oZFm-9" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="GHgeBMR-SrvCu2a6oZFm-1" source="GHgeBMR-SrvCu2a6oZFm-10" target="GHgeBMR-SrvCu2a6oZFm-12"> + <mxGeometry relative="1" as="geometry" /> + </mxCell> + <mxCell id="GHgeBMR-SrvCu2a6oZFm-10" value="&lt;div align=&quot;center&quot;&gt;&lt;font style=&quot;font-size: 12px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &lt;b&gt;aggregationCircuit&lt;/b&gt;&lt;/font&gt;&lt;/div&gt;&lt;ul&gt;&lt;li align=&quot;left&quot;&gt;&lt;b&gt;proof system&lt;/b&gt;: Groth16&lt;/li&gt;&lt;li align=&quot;left&quot;&gt;&lt;b&gt;elliptic curve&lt;/b&gt;: BW6-761&lt;/li&gt;&lt;li align=&quot;left&quot;&gt;&lt;font style=&quot;font-size: 12px;&quot;&gt;&lt;b&gt;software&lt;/b&gt;: gnark&lt;/font&gt;&lt;/li&gt;&lt;/ul&gt;" style="rounded=0;whiteSpace=wrap;html=1;fontFamily=Courier New;fillColor=#f5f5f5;fontColor=#333333;strokeColor=#666666;align=left;spacingLeft=-16;spacingBottom=-11;" vertex="1" parent="GHgeBMR-SrvCu2a6oZFm-1"> + <mxGeometry x="720" y="100" width="220" height="100" as="geometry" /> + </mxCell> + <mxCell id="GHgeBMR-SrvCu2a6oZFm-11" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.588;entryDx=0;entryDy=0;entryPerimeter=0;" edge="1" parent="GHgeBMR-SrvCu2a6oZFm-1" source="GHgeBMR-SrvCu2a6oZFm-12" target="GHgeBMR-SrvCu2a6oZFm-18"> + <mxGeometry relative="1" as="geometry" /> + </mxCell> + <mxCell id="GHgeBMR-SrvCu2a6oZFm-12" value="&lt;div align=&quot;center&quot;&gt;&lt;font style=&quot;font-size: 12px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;b&gt;stateTransitionCircuit&lt;/b&gt;&lt;/font&gt;&lt;/div&gt;&lt;ul&gt;&lt;li align=&quot;left&quot;&gt;&lt;b&gt;proof system&lt;/b&gt;: Groth16&lt;/li&gt;&lt;li align=&quot;left&quot;&gt;&lt;b&gt;elliptic curve&lt;/b&gt;: BN254&lt;/li&gt;&lt;li align=&quot;left&quot;&gt;&lt;font style=&quot;font-size: 12px;&quot;&gt;&lt;b&gt;software&lt;/b&gt;: gnark&lt;/font&gt;&lt;/li&gt;&lt;/ul&gt;" style="rounded=0;whiteSpace=wrap;html=1;fontFamily=Courier New;fillColor=#f5f5f5;fontColor=#333333;strokeColor=#666666;align=left;spacingLeft=-16;spacingBottom=-11;" vertex="1" parent="GHgeBMR-SrvCu2a6oZFm-1"> + <mxGeometry x="1000" y="100" width="220" height="100" as="geometry" /> + </mxCell> + <mxCell id="GHgeBMR-SrvCu2a6oZFm-13" value="2" style="whiteSpace=wrap;html=1;aspect=fixed;" vertex="1" parent="GHgeBMR-SrvCu2a6oZFm-1"> + <mxGeometry x="440" y="100" width="20" height="20" as="geometry" /> + </mxCell> + <mxCell id="GHgeBMR-SrvCu2a6oZFm-14" value="3" style="whiteSpace=wrap;html=1;aspect=fixed;" vertex="1" parent="GHgeBMR-SrvCu2a6oZFm-1"> + <mxGeometry x="720" y="100" width="20" height="20" as="geometry" /> + </mxCell> + <mxCell id="GHgeBMR-SrvCu2a6oZFm-15" value="4" style="whiteSpace=wrap;html=1;aspect=fixed;" vertex="1" parent="GHgeBMR-SrvCu2a6oZFm-1"> + <mxGeometry x="1000" y="100" width="20" height="20" as="geometry" /> + </mxCell> + <mxCell id="GHgeBMR-SrvCu2a6oZFm-16" value="&lt;b&gt;VOTER&lt;/b&gt;" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="GHgeBMR-SrvCu2a6oZFm-1"> + <mxGeometry x="200" y="60" width="60" height="30" as="geometry" /> + </mxCell> + <mxCell id="GHgeBMR-SrvCu2a6oZFm-17" value="&lt;b&gt;SEQUENCER&lt;/b&gt;" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="GHgeBMR-SrvCu2a6oZFm-1"> + <mxGeometry x="800" y="60" width="60" height="30" as="geometry" /> + </mxCell> + <mxCell id="GHgeBMR-SrvCu2a6oZFm-18" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#dae8fc;dashed=1;dashPattern=1 1;strokeColor=#6c8ebf;" vertex="1" parent="GHgeBMR-SrvCu2a6oZFm-1"> + <mxGeometry x="1300" y="50" width="110" height="170" as="geometry" /> + </mxCell> + <mxCell id="GHgeBMR-SrvCu2a6oZFm-19" value="" style="shape=image;html=1;verticalAlign=top;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;imageAspect=0;aspect=fixed;image=https://cdn0.iconfinder.com/data/icons/phosphor-light-vol-2/256/currency-eth-light-128.png" vertex="1" parent="GHgeBMR-SrvCu2a6oZFm-1"> + <mxGeometry x="1326" y="121" width="60" height="60" as="geometry" /> + </mxCell> + <mxCell id="GHgeBMR-SrvCu2a6oZFm-20" value="&lt;b&gt;ETHEREUM&lt;/b&gt;" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="GHgeBMR-SrvCu2a6oZFm-1"> + <mxGeometry x="1300" y="60" width="110" height="50" as="geometry" /> + </mxCell> + <mxCell id="GHgeBMR-SrvCu2a6oZFm-21" value="&lt;font face=&quot;Courier New&quot;&gt;single&lt;br&gt;&lt;br&gt;proof&lt;/font&gt;" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=8;spacing=2;" vertex="1" parent="GHgeBMR-SrvCu2a6oZFm-1"> + <mxGeometry x="345" y="136" width="90" height="30" as="geometry" /> + </mxCell> + <mxCell id="MallOlgt1alMpf3XHxyd-3" value="&lt;font face=&quot;Courier New&quot;&gt;single&lt;br&gt;&lt;br&gt;proof&lt;/font&gt;" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=8;" vertex="1" parent="GHgeBMR-SrvCu2a6oZFm-1"> + <mxGeometry x="922" y="136" width="90" height="30" as="geometry" /> + </mxCell> + <mxCell id="MallOlgt1alMpf3XHxyd-4" value="&lt;font face=&quot;Courier New&quot;&gt;single&lt;br&gt;&lt;br&gt;proof&lt;/font&gt;" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=8;" vertex="1" parent="GHgeBMR-SrvCu2a6oZFm-1"> + <mxGeometry x="1220" y="135" width="90" height="30" as="geometry" /> + </mxCell> + <mxCell id="BSBgdAjoNGHEuOLqmqQ3-0" value="&lt;font face=&quot;Courier New&quot;&gt;multiple&lt;br&gt;&lt;br&gt;proofs&lt;/font&gt;" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=8;" vertex="1" parent="GHgeBMR-SrvCu2a6oZFm-1"> + <mxGeometry x="640" y="141" width="90" height="16" as="geometry" /> + </mxCell> + <mxCell id="BSBgdAjoNGHEuOLqmqQ3-2" value="" style="edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;rounded=0;exitX=1;exitY=0.25;exitDx=0;exitDy=0;entryX=0;entryY=0.25;entryDx=0;entryDy=0;" edge="1" parent="GHgeBMR-SrvCu2a6oZFm-1"> + <mxGeometry width="100" relative="1" as="geometry"> + <mxPoint x="660" y="130" as="sourcePoint" /> + <mxPoint x="720" y="130" as="targetPoint" /> + <Array as="points" /> + </mxGeometry> + </mxCell> + <mxCell id="BSBgdAjoNGHEuOLqmqQ3-3" value="" style="edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;rounded=0;exitX=1;exitY=0.75;exitDx=0;exitDy=0;entryX=0;entryY=0.75;entryDx=0;entryDy=0;" edge="1" parent="GHgeBMR-SrvCu2a6oZFm-1"> + <mxGeometry width="100" relative="1" as="geometry"> + <mxPoint x="660" y="170" as="sourcePoint" /> + <mxPoint x="720" y="170" as="targetPoint" /> + <Array as="points" /> + </mxGeometry> + </mxCell> + </root> + </mxGraphModel> + </diagram> + <diagram name="Copy of circuits-flow" id="hW8jq8S85CGl5mqyty0T"> + <mxGraphModel dx="1916" dy="827" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="850" pageHeight="1100" math="0" shadow="0"> + <root> + <mxCell id="Jj908fBoKc_3zpw7SCSJ-0" /> + <mxCell id="Jj908fBoKc_3zpw7SCSJ-1" parent="Jj908fBoKc_3zpw7SCSJ-0" /> + <mxCell id="Jj908fBoKc_3zpw7SCSJ-2" value="" style="group;fillColor=#d5e8d4;strokeColor=#82b366;container=0;" vertex="1" connectable="0" parent="Jj908fBoKc_3zpw7SCSJ-1"> + <mxGeometry x="100" y="50" width="260" height="170" as="geometry" /> + </mxCell> + <mxCell id="Jj908fBoKc_3zpw7SCSJ-3" value="" style="group;fillColor=#e1d5e7;strokeColor=#9673a6;container=0;" vertex="1" connectable="0" parent="Jj908fBoKc_3zpw7SCSJ-1"> + <mxGeometry x="420" y="50" width="820" height="170" as="geometry" /> + </mxCell> + <mxCell id="Jj908fBoKc_3zpw7SCSJ-4" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="Jj908fBoKc_3zpw7SCSJ-1" source="Jj908fBoKc_3zpw7SCSJ-5" target="Jj908fBoKc_3zpw7SCSJ-8"> + <mxGeometry relative="1" as="geometry" /> + </mxCell> + <mxCell id="Jj908fBoKc_3zpw7SCSJ-5" value="&lt;div align=&quot;center&quot;&gt;&lt;font style=&quot;font-size: 12px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;b&gt;Ballot circuit&lt;/b&gt;&lt;/font&gt;&lt;/div&gt;&lt;ul&gt;&lt;li align=&quot;left&quot;&gt;&lt;b&gt;proof system&lt;/b&gt;: Groth16&lt;/li&gt;&lt;li align=&quot;left&quot;&gt;&lt;b&gt;elliptic curve&lt;/b&gt;: BN254&lt;/li&gt;&lt;li align=&quot;left&quot;&gt;&lt;font style=&quot;font-size: 12px;&quot;&gt;&lt;b&gt;software&lt;/b&gt;: circom&lt;/font&gt;&lt;/li&gt;&lt;/ul&gt;" style="rounded=0;whiteSpace=wrap;html=1;fontFamily=Courier New;fillColor=#f5f5f5;fontColor=#333333;strokeColor=#666666;align=left;spacingLeft=-16;spacingBottom=-11;" vertex="1" parent="Jj908fBoKc_3zpw7SCSJ-1"> + <mxGeometry x="120" y="100" width="220" height="100" as="geometry" /> + </mxCell> + <mxCell id="Jj908fBoKc_3zpw7SCSJ-6" value="1" style="whiteSpace=wrap;html=1;aspect=fixed;" vertex="1" parent="Jj908fBoKc_3zpw7SCSJ-1"> + <mxGeometry x="120" y="100" width="20" height="20" as="geometry" /> + </mxCell> + <mxCell id="Jj908fBoKc_3zpw7SCSJ-7" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="Jj908fBoKc_3zpw7SCSJ-1" source="Jj908fBoKc_3zpw7SCSJ-8" target="Jj908fBoKc_3zpw7SCSJ-10"> + <mxGeometry relative="1" as="geometry" /> + </mxCell> + <mxCell id="Jj908fBoKc_3zpw7SCSJ-8" value="&lt;div align=&quot;center&quot;&gt;&lt;font style=&quot;font-size: 12px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;b&gt;Verifier circuit&lt;/b&gt;&lt;/font&gt;&lt;/div&gt;&lt;ul&gt;&lt;li align=&quot;left&quot;&gt;&lt;b&gt;proof system&lt;/b&gt;: Groth16&lt;/li&gt;&lt;li align=&quot;left&quot;&gt;&lt;b&gt;elliptic curve&lt;/b&gt;: BLS12-377&lt;/li&gt;&lt;li align=&quot;left&quot;&gt;&lt;font style=&quot;font-size: 12px;&quot;&gt;&lt;b&gt;software&lt;/b&gt;: gnark&lt;/font&gt;&lt;/li&gt;&lt;/ul&gt;" style="rounded=0;whiteSpace=wrap;html=1;fontFamily=Courier New;fillColor=#f5f5f5;fontColor=#333333;strokeColor=#666666;align=left;spacingLeft=-16;spacingBottom=-11;" vertex="1" parent="Jj908fBoKc_3zpw7SCSJ-1"> + <mxGeometry x="440" y="100" width="220" height="100" as="geometry" /> + </mxCell> + <mxCell id="Jj908fBoKc_3zpw7SCSJ-9" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="Jj908fBoKc_3zpw7SCSJ-1" source="Jj908fBoKc_3zpw7SCSJ-10" target="Jj908fBoKc_3zpw7SCSJ-12"> + <mxGeometry relative="1" as="geometry" /> + </mxCell> + <mxCell id="Jj908fBoKc_3zpw7SCSJ-10" value="&lt;div align=&quot;center&quot;&gt;&lt;font style=&quot;font-size: 12px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &lt;b&gt;Aggregation circuit&lt;/b&gt;&lt;/font&gt;&lt;/div&gt;&lt;ul&gt;&lt;li align=&quot;left&quot;&gt;&lt;b&gt;proof system&lt;/b&gt;: Groth16&lt;/li&gt;&lt;li align=&quot;left&quot;&gt;&lt;b&gt;elliptic curve&lt;/b&gt;: BW6-761&lt;/li&gt;&lt;li align=&quot;left&quot;&gt;&lt;font style=&quot;font-size: 12px;&quot;&gt;&lt;b&gt;software&lt;/b&gt;: gnark&lt;/font&gt;&lt;/li&gt;&lt;/ul&gt;" style="rounded=0;whiteSpace=wrap;html=1;fontFamily=Courier New;fillColor=#f5f5f5;fontColor=#333333;strokeColor=#666666;align=left;spacingLeft=-16;spacingBottom=-11;" vertex="1" parent="Jj908fBoKc_3zpw7SCSJ-1"> + <mxGeometry x="720" y="100" width="220" height="100" as="geometry" /> + </mxCell> + <mxCell id="Jj908fBoKc_3zpw7SCSJ-11" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.588;entryDx=0;entryDy=0;entryPerimeter=0;" edge="1" parent="Jj908fBoKc_3zpw7SCSJ-1" source="Jj908fBoKc_3zpw7SCSJ-12" target="Jj908fBoKc_3zpw7SCSJ-18"> + <mxGeometry relative="1" as="geometry" /> + </mxCell> + <mxCell id="Jj908fBoKc_3zpw7SCSJ-12" value="&lt;div align=&quot;center&quot;&gt;&lt;font style=&quot;font-size: 12px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;b&gt;State transition circuit&lt;/b&gt;&lt;/font&gt;&lt;/div&gt;&lt;ul&gt;&lt;li align=&quot;left&quot;&gt;&lt;b&gt;proof system&lt;/b&gt;: Groth16&lt;/li&gt;&lt;li align=&quot;left&quot;&gt;&lt;b&gt;elliptic curve&lt;/b&gt;: BN254&lt;/li&gt;&lt;li align=&quot;left&quot;&gt;&lt;font style=&quot;font-size: 12px;&quot;&gt;&lt;b&gt;software&lt;/b&gt;: gnark&lt;/font&gt;&lt;/li&gt;&lt;/ul&gt;" style="rounded=0;whiteSpace=wrap;html=1;fontFamily=Courier New;fillColor=#f5f5f5;fontColor=#333333;strokeColor=#666666;align=left;spacingLeft=-16;spacingBottom=-11;" vertex="1" parent="Jj908fBoKc_3zpw7SCSJ-1"> + <mxGeometry x="1000" y="100" width="220" height="100" as="geometry" /> + </mxCell> + <mxCell id="Jj908fBoKc_3zpw7SCSJ-13" value="2" style="whiteSpace=wrap;html=1;aspect=fixed;" vertex="1" parent="Jj908fBoKc_3zpw7SCSJ-1"> + <mxGeometry x="440" y="100" width="20" height="20" as="geometry" /> + </mxCell> + <mxCell id="Jj908fBoKc_3zpw7SCSJ-14" value="3" style="whiteSpace=wrap;html=1;aspect=fixed;" vertex="1" parent="Jj908fBoKc_3zpw7SCSJ-1"> + <mxGeometry x="720" y="100" width="20" height="20" as="geometry" /> + </mxCell> + <mxCell id="Jj908fBoKc_3zpw7SCSJ-15" value="4" style="whiteSpace=wrap;html=1;aspect=fixed;" vertex="1" parent="Jj908fBoKc_3zpw7SCSJ-1"> + <mxGeometry x="1000" y="100" width="20" height="20" as="geometry" /> + </mxCell> + <mxCell id="Jj908fBoKc_3zpw7SCSJ-16" value="&lt;b&gt;VOTER&lt;/b&gt;" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="Jj908fBoKc_3zpw7SCSJ-1"> + <mxGeometry x="200" y="60" width="60" height="30" as="geometry" /> + </mxCell> + <mxCell id="Jj908fBoKc_3zpw7SCSJ-17" value="&lt;b&gt;SEQUENCER&lt;/b&gt;" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="Jj908fBoKc_3zpw7SCSJ-1"> + <mxGeometry x="800" y="60" width="60" height="30" as="geometry" /> + </mxCell> + <mxCell id="Jj908fBoKc_3zpw7SCSJ-18" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#dae8fc;dashed=1;dashPattern=1 1;strokeColor=#6c8ebf;" vertex="1" parent="Jj908fBoKc_3zpw7SCSJ-1"> + <mxGeometry x="1300" y="50" width="110" height="170" as="geometry" /> + </mxCell> + <mxCell id="Jj908fBoKc_3zpw7SCSJ-19" value="" style="shape=image;html=1;verticalAlign=top;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;imageAspect=0;aspect=fixed;image=https://cdn0.iconfinder.com/data/icons/phosphor-light-vol-2/256/currency-eth-light-128.png" vertex="1" parent="Jj908fBoKc_3zpw7SCSJ-1"> + <mxGeometry x="1326" y="121" width="60" height="60" as="geometry" /> + </mxCell> + <mxCell id="Jj908fBoKc_3zpw7SCSJ-20" value="&lt;b&gt;ETHEREUM&lt;/b&gt;" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="Jj908fBoKc_3zpw7SCSJ-1"> + <mxGeometry x="1300" y="60" width="110" height="50" as="geometry" /> + </mxCell> + <mxCell id="Jj908fBoKc_3zpw7SCSJ-21" value="&lt;font face=&quot;Courier New&quot;&gt;single&lt;br&gt;&lt;br&gt;proof&lt;/font&gt;" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=8;spacing=2;" vertex="1" parent="Jj908fBoKc_3zpw7SCSJ-1"> + <mxGeometry x="345" y="136" width="90" height="30" as="geometry" /> + </mxCell> + <mxCell id="Jj908fBoKc_3zpw7SCSJ-22" value="&lt;font face=&quot;Courier New&quot;&gt;single&lt;br&gt;&lt;br&gt;proof&lt;/font&gt;" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=8;" vertex="1" parent="Jj908fBoKc_3zpw7SCSJ-1"> + <mxGeometry x="922" y="136" width="90" height="30" as="geometry" /> + </mxCell> + <mxCell id="Jj908fBoKc_3zpw7SCSJ-23" value="&lt;font face=&quot;Courier New&quot;&gt;single&lt;br&gt;&lt;br&gt;proof&lt;/font&gt;" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=8;" vertex="1" parent="Jj908fBoKc_3zpw7SCSJ-1"> + <mxGeometry x="1220" y="135" width="90" height="30" as="geometry" /> + </mxCell> + <mxCell id="Jj908fBoKc_3zpw7SCSJ-24" value="&lt;font face=&quot;Courier New&quot;&gt;multiple&lt;br&gt;&lt;br&gt;proofs&lt;/font&gt;" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=8;" vertex="1" parent="Jj908fBoKc_3zpw7SCSJ-1"> + <mxGeometry x="640" y="141" width="90" height="16" as="geometry" /> + </mxCell> + <mxCell id="Jj908fBoKc_3zpw7SCSJ-25" value="" style="edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;rounded=0;exitX=1;exitY=0.25;exitDx=0;exitDy=0;entryX=0;entryY=0.25;entryDx=0;entryDy=0;" edge="1" parent="Jj908fBoKc_3zpw7SCSJ-1"> + <mxGeometry width="100" relative="1" as="geometry"> + <mxPoint x="660" y="130" as="sourcePoint" /> + <mxPoint x="720" y="130" as="targetPoint" /> + <Array as="points" /> + </mxGeometry> + </mxCell> + <mxCell id="Jj908fBoKc_3zpw7SCSJ-26" value="" style="edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;rounded=0;exitX=1;exitY=0.75;exitDx=0;exitDy=0;entryX=0;entryY=0.75;entryDx=0;entryDy=0;" edge="1" parent="Jj908fBoKc_3zpw7SCSJ-1"> + <mxGeometry width="100" relative="1" as="geometry"> + <mxPoint x="660" y="170" as="sourcePoint" /> + <mxPoint x="720" y="170" as="targetPoint" /> + <Array as="points" /> + </mxGeometry> + </mxCell> + </root> + </mxGraphModel> + </diagram> + <diagram name="circuits-flow-1" id="nHw44hOpP64Sk43fXblB"> + <mxGraphModel dx="1341" dy="579" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="850" pageHeight="1100" math="0" shadow="0"> + <root> + <mxCell id="eKZaJXNIVT3F8Qit3XyO-0" /> + <mxCell id="eKZaJXNIVT3F8Qit3XyO-1" parent="eKZaJXNIVT3F8Qit3XyO-0" /> + <mxCell id="eKZaJXNIVT3F8Qit3XyO-2" value="" style="group;fillColor=#d5e8d4;strokeColor=#82b366;container=0;" vertex="1" connectable="0" parent="eKZaJXNIVT3F8Qit3XyO-1"> + <mxGeometry x="100" y="50" width="260" height="170" as="geometry" /> + </mxCell> + <mxCell id="eKZaJXNIVT3F8Qit3XyO-3" value="" style="group;fillColor=#e1d5e7;strokeColor=#9673a6;container=0;" vertex="1" connectable="0" parent="eKZaJXNIVT3F8Qit3XyO-1"> + <mxGeometry x="420" y="50" width="820" height="170" as="geometry" /> + </mxCell> + <mxCell id="eKZaJXNIVT3F8Qit3XyO-4" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="eKZaJXNIVT3F8Qit3XyO-1" source="eKZaJXNIVT3F8Qit3XyO-5" target="eKZaJXNIVT3F8Qit3XyO-8"> + <mxGeometry relative="1" as="geometry" /> + </mxCell> + <mxCell id="eKZaJXNIVT3F8Qit3XyO-5" value="&lt;div align=&quot;center&quot;&gt;&lt;font style=&quot;font-size: 12px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;b&gt;ballotCircuit&lt;/b&gt;&lt;/font&gt;&lt;/div&gt;&lt;ul&gt;&lt;li align=&quot;left&quot;&gt;&lt;b&gt;proof system&lt;/b&gt;: Groth16&lt;/li&gt;&lt;li align=&quot;left&quot;&gt;&lt;b&gt;elliptic curve&lt;/b&gt;: BN254&lt;/li&gt;&lt;li align=&quot;left&quot;&gt;&lt;font style=&quot;font-size: 12px;&quot;&gt;&lt;b&gt;software&lt;/b&gt;: circom&lt;/font&gt;&lt;/li&gt;&lt;/ul&gt;" style="rounded=0;whiteSpace=wrap;html=1;fontFamily=Courier New;fillColor=#f5f5f5;fontColor=#333333;strokeColor=#666666;align=left;spacingLeft=-16;spacingBottom=-11;" vertex="1" parent="eKZaJXNIVT3F8Qit3XyO-1"> + <mxGeometry x="120" y="100" width="220" height="100" as="geometry" /> + </mxCell> + <mxCell id="eKZaJXNIVT3F8Qit3XyO-6" value="1" style="whiteSpace=wrap;html=1;aspect=fixed;" vertex="1" parent="eKZaJXNIVT3F8Qit3XyO-1"> + <mxGeometry x="120" y="100" width="20" height="20" as="geometry" /> + </mxCell> + <mxCell id="eKZaJXNIVT3F8Qit3XyO-7" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="eKZaJXNIVT3F8Qit3XyO-1" source="eKZaJXNIVT3F8Qit3XyO-8" target="eKZaJXNIVT3F8Qit3XyO-10"> + <mxGeometry relative="1" as="geometry" /> + </mxCell> + <mxCell id="eKZaJXNIVT3F8Qit3XyO-8" value="&lt;div align=&quot;center&quot;&gt;&lt;font style=&quot;font-size: 12px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;b&gt;verifierCircuit&lt;/b&gt;&lt;/font&gt;&lt;/div&gt;&lt;ul&gt;&lt;li align=&quot;left&quot;&gt;&lt;b&gt;proof system&lt;/b&gt;: Groth16&lt;/li&gt;&lt;li align=&quot;left&quot;&gt;&lt;b&gt;elliptic curve&lt;/b&gt;: BLS12-377&lt;/li&gt;&lt;li align=&quot;left&quot;&gt;&lt;font style=&quot;font-size: 12px;&quot;&gt;&lt;b&gt;software&lt;/b&gt;: gnark&lt;/font&gt;&lt;/li&gt;&lt;/ul&gt;" style="rounded=0;whiteSpace=wrap;html=1;fontFamily=Courier New;fillColor=#f5f5f5;fontColor=#333333;strokeColor=#666666;align=left;spacingLeft=-16;spacingBottom=-11;" vertex="1" parent="eKZaJXNIVT3F8Qit3XyO-1"> + <mxGeometry x="440" y="100" width="220" height="100" as="geometry" /> + </mxCell> + <mxCell id="eKZaJXNIVT3F8Qit3XyO-9" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="eKZaJXNIVT3F8Qit3XyO-1" source="eKZaJXNIVT3F8Qit3XyO-10" target="eKZaJXNIVT3F8Qit3XyO-12"> + <mxGeometry relative="1" as="geometry" /> + </mxCell> + <mxCell id="eKZaJXNIVT3F8Qit3XyO-10" value="&lt;div align=&quot;center&quot;&gt;&lt;font style=&quot;font-size: 12px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &lt;b&gt;aggregationCircuit&lt;/b&gt;&lt;/font&gt;&lt;/div&gt;&lt;ul&gt;&lt;li align=&quot;left&quot;&gt;&lt;b&gt;proof system&lt;/b&gt;: Groth16&lt;/li&gt;&lt;li align=&quot;left&quot;&gt;&lt;b&gt;elliptic curve&lt;/b&gt;: BW6-761&lt;/li&gt;&lt;li align=&quot;left&quot;&gt;&lt;font style=&quot;font-size: 12px;&quot;&gt;&lt;b&gt;software&lt;/b&gt;: gnark&lt;/font&gt;&lt;/li&gt;&lt;/ul&gt;" style="rounded=0;whiteSpace=wrap;html=1;fontFamily=Courier New;fillColor=#f5f5f5;fontColor=#333333;strokeColor=#666666;align=left;spacingLeft=-16;spacingBottom=-11;" vertex="1" parent="eKZaJXNIVT3F8Qit3XyO-1"> + <mxGeometry x="720" y="100" width="220" height="100" as="geometry" /> + </mxCell> + <mxCell id="eKZaJXNIVT3F8Qit3XyO-11" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.588;entryDx=0;entryDy=0;entryPerimeter=0;" edge="1" parent="eKZaJXNIVT3F8Qit3XyO-1" source="eKZaJXNIVT3F8Qit3XyO-12" target="eKZaJXNIVT3F8Qit3XyO-18"> + <mxGeometry relative="1" as="geometry" /> + </mxCell> + <mxCell id="eKZaJXNIVT3F8Qit3XyO-12" value="&lt;div align=&quot;center&quot;&gt;&lt;font style=&quot;font-size: 12px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;b&gt;stateTransitionCircuit&lt;/b&gt;&lt;/font&gt;&lt;/div&gt;&lt;ul&gt;&lt;li align=&quot;left&quot;&gt;&lt;b&gt;proof system&lt;/b&gt;: Groth16&lt;/li&gt;&lt;li align=&quot;left&quot;&gt;&lt;b&gt;elliptic curve&lt;/b&gt;: BN254&lt;/li&gt;&lt;li align=&quot;left&quot;&gt;&lt;font style=&quot;font-size: 12px;&quot;&gt;&lt;b&gt;software&lt;/b&gt;: gnark&lt;/font&gt;&lt;/li&gt;&lt;/ul&gt;" style="rounded=0;whiteSpace=wrap;html=1;fontFamily=Courier New;fillColor=#f5f5f5;fontColor=#333333;strokeColor=#666666;align=left;spacingLeft=-16;spacingBottom=-11;" vertex="1" parent="eKZaJXNIVT3F8Qit3XyO-1"> + <mxGeometry x="1000" y="100" width="220" height="100" as="geometry" /> + </mxCell> + <mxCell id="eKZaJXNIVT3F8Qit3XyO-13" value="2" style="whiteSpace=wrap;html=1;aspect=fixed;" vertex="1" parent="eKZaJXNIVT3F8Qit3XyO-1"> + <mxGeometry x="440" y="100" width="20" height="20" as="geometry" /> + </mxCell> + <mxCell id="eKZaJXNIVT3F8Qit3XyO-14" value="3" style="whiteSpace=wrap;html=1;aspect=fixed;" vertex="1" parent="eKZaJXNIVT3F8Qit3XyO-1"> + <mxGeometry x="720" y="100" width="20" height="20" as="geometry" /> + </mxCell> + <mxCell id="eKZaJXNIVT3F8Qit3XyO-15" value="4" style="whiteSpace=wrap;html=1;aspect=fixed;" vertex="1" parent="eKZaJXNIVT3F8Qit3XyO-1"> + <mxGeometry x="1000" y="100" width="20" height="20" as="geometry" /> + </mxCell> + <mxCell id="eKZaJXNIVT3F8Qit3XyO-16" value="&lt;b&gt;VOTER&lt;/b&gt;" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="eKZaJXNIVT3F8Qit3XyO-1"> + <mxGeometry x="200" y="60" width="60" height="30" as="geometry" /> + </mxCell> + <mxCell id="eKZaJXNIVT3F8Qit3XyO-17" value="&lt;b&gt;SEQUENCER&lt;/b&gt;" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="eKZaJXNIVT3F8Qit3XyO-1"> + <mxGeometry x="800" y="60" width="60" height="30" as="geometry" /> + </mxCell> + <mxCell id="eKZaJXNIVT3F8Qit3XyO-18" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#dae8fc;dashed=1;dashPattern=1 1;strokeColor=#6c8ebf;" vertex="1" parent="eKZaJXNIVT3F8Qit3XyO-1"> + <mxGeometry x="1300" y="50" width="110" height="170" as="geometry" /> + </mxCell> + <mxCell id="eKZaJXNIVT3F8Qit3XyO-19" value="" style="shape=image;html=1;verticalAlign=top;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;imageAspect=0;aspect=fixed;image=https://cdn0.iconfinder.com/data/icons/phosphor-light-vol-2/256/currency-eth-light-128.png" vertex="1" parent="eKZaJXNIVT3F8Qit3XyO-1"> + <mxGeometry x="1326" y="121" width="60" height="60" as="geometry" /> + </mxCell> + <mxCell id="eKZaJXNIVT3F8Qit3XyO-20" value="&lt;b&gt;ETHEREUM&lt;/b&gt;" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="eKZaJXNIVT3F8Qit3XyO-1"> + <mxGeometry x="1300" y="60" width="110" height="50" as="geometry" /> + </mxCell> + <mxCell id="eKZaJXNIVT3F8Qit3XyO-21" value="&lt;font face=&quot;Courier New&quot;&gt;single&lt;br&gt;&lt;br&gt;proof&lt;/font&gt;" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=8;spacing=2;" vertex="1" parent="eKZaJXNIVT3F8Qit3XyO-1"> + <mxGeometry x="345" y="136" width="90" height="30" as="geometry" /> + </mxCell> + <mxCell id="eKZaJXNIVT3F8Qit3XyO-22" value="&lt;font face=&quot;Courier New&quot;&gt;single&lt;br&gt;&lt;br&gt;proof&lt;/font&gt;" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=8;" vertex="1" parent="eKZaJXNIVT3F8Qit3XyO-1"> + <mxGeometry x="922" y="136" width="90" height="30" as="geometry" /> + </mxCell> + <mxCell id="eKZaJXNIVT3F8Qit3XyO-23" value="&lt;font face=&quot;Courier New&quot;&gt;single&lt;br&gt;&lt;br&gt;proof&lt;/font&gt;" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=8;" vertex="1" parent="eKZaJXNIVT3F8Qit3XyO-1"> + <mxGeometry x="1220" y="135" width="90" height="30" as="geometry" /> + </mxCell> + <mxCell id="eKZaJXNIVT3F8Qit3XyO-24" value="&lt;font face=&quot;Courier New&quot;&gt;multiple&lt;br&gt;&lt;br&gt;proofs&lt;/font&gt;" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=8;" vertex="1" parent="eKZaJXNIVT3F8Qit3XyO-1"> + <mxGeometry x="640" y="141" width="90" height="16" as="geometry" /> + </mxCell> + <mxCell id="eKZaJXNIVT3F8Qit3XyO-25" value="" style="edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;rounded=0;exitX=1;exitY=0.25;exitDx=0;exitDy=0;entryX=0;entryY=0.25;entryDx=0;entryDy=0;" edge="1" parent="eKZaJXNIVT3F8Qit3XyO-1"> + <mxGeometry width="100" relative="1" as="geometry"> + <mxPoint x="660" y="130" as="sourcePoint" /> + <mxPoint x="720" y="130" as="targetPoint" /> + <Array as="points" /> + </mxGeometry> + </mxCell> + <mxCell id="eKZaJXNIVT3F8Qit3XyO-26" value="" style="edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;rounded=0;exitX=1;exitY=0.75;exitDx=0;exitDy=0;entryX=0;entryY=0.75;entryDx=0;entryDy=0;" edge="1" parent="eKZaJXNIVT3F8Qit3XyO-1"> + <mxGeometry width="100" relative="1" as="geometry"> + <mxPoint x="660" y="170" as="sourcePoint" /> + <mxPoint x="720" y="170" as="targetPoint" /> + <Array as="points" /> + </mxGeometry> + </mxCell> + <mxCell id="eKZaJXNIVT3F8Qit3XyO-27" value="" style="edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;rounded=0;exitX=1;exitY=0.25;exitDx=0;exitDy=0;entryX=0;entryY=0.25;entryDx=0;entryDy=0;" edge="1" parent="eKZaJXNIVT3F8Qit3XyO-1"> + <mxGeometry width="100" relative="1" as="geometry"> + <mxPoint x="660" y="109.5" as="sourcePoint" /> + <mxPoint x="720" y="109.5" as="targetPoint" /> + <Array as="points" /> + </mxGeometry> + </mxCell> + <mxCell id="eKZaJXNIVT3F8Qit3XyO-28" value="" style="edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;rounded=0;exitX=1;exitY=0.75;exitDx=0;exitDy=0;entryX=0;entryY=0.75;entryDx=0;entryDy=0;" edge="1" parent="eKZaJXNIVT3F8Qit3XyO-1"> + <mxGeometry width="100" relative="1" as="geometry"> + <mxPoint x="660" y="190" as="sourcePoint" /> + <mxPoint x="720" y="190" as="targetPoint" /> + <Array as="points" /> + </mxGeometry> + </mxCell> + </root> + </mxGraphModel> + </diagram> + <diagram name="circuits-flow-2" id="51-ft9-jt65cpGgfRrZc"> + <mxGraphModel dx="1357" dy="838" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="850" pageHeight="1100" math="0" shadow="0"> + <root> + <mxCell id="0" /> + <mxCell id="1" parent="0" /> + <mxCell id="leIHP_gTSu-8pZ8RQmnW-22" value="" style="group;fillColor=#d5e8d4;strokeColor=#82b366;container=0;" vertex="1" connectable="0" parent="1"> + <mxGeometry x="140" y="50" width="260" height="170" as="geometry" /> + </mxCell> + <mxCell id="leIHP_gTSu-8pZ8RQmnW-19" value="" style="group;fillColor=#e1d5e7;strokeColor=#9673a6;container=0;" vertex="1" connectable="0" parent="1"> + <mxGeometry x="420" y="50" width="820" height="170" as="geometry" /> + </mxCell> + <mxCell id="leIHP_gTSu-8pZ8RQmnW-15" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="1" source="leIHP_gTSu-8pZ8RQmnW-3" target="leIHP_gTSu-8pZ8RQmnW-12"> + <mxGeometry relative="1" as="geometry" /> + </mxCell> + <mxCell id="leIHP_gTSu-8pZ8RQmnW-3" value="&lt;div align=&quot;center&quot;&gt;&lt;font style=&quot;font-size: 12px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;b&gt;ballotCircuit&lt;/b&gt;&lt;/font&gt;&lt;/div&gt;&lt;ul&gt;&lt;li align=&quot;left&quot;&gt;&lt;b&gt;proof system&lt;/b&gt;: Groth16&lt;/li&gt;&lt;li align=&quot;left&quot;&gt;&lt;b&gt;elliptic curve&lt;/b&gt;: BN254&lt;/li&gt;&lt;li align=&quot;left&quot;&gt;&lt;font style=&quot;font-size: 12px;&quot;&gt;&lt;b&gt;software&lt;/b&gt;: circom&lt;/font&gt;&lt;/li&gt;&lt;/ul&gt;" style="rounded=0;whiteSpace=wrap;html=1;fontFamily=Courier New;fillColor=#f5f5f5;fontColor=#333333;strokeColor=#666666;align=left;spacingLeft=-16;spacingBottom=-11;" vertex="1" parent="1"> + <mxGeometry x="160" y="100" width="220" height="100" as="geometry" /> + </mxCell> + <mxCell id="leIHP_gTSu-8pZ8RQmnW-6" value="1" style="whiteSpace=wrap;html=1;aspect=fixed;" vertex="1" parent="1"> + <mxGeometry x="160" y="100" width="20" height="20" as="geometry" /> + </mxCell> + <mxCell id="leIHP_gTSu-8pZ8RQmnW-16" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="1" source="leIHP_gTSu-8pZ8RQmnW-12" target="leIHP_gTSu-8pZ8RQmnW-13"> + <mxGeometry relative="1" as="geometry" /> + </mxCell> + <mxCell id="leIHP_gTSu-8pZ8RQmnW-12" value="&lt;div align=&quot;center&quot;&gt;&lt;font style=&quot;font-size: 12px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;b&gt;verifierCircuit&lt;/b&gt;&lt;/font&gt;&lt;/div&gt;&lt;ul&gt;&lt;li align=&quot;left&quot;&gt;&lt;b&gt;proof system&lt;/b&gt;: Groth16&lt;/li&gt;&lt;li align=&quot;left&quot;&gt;&lt;b&gt;elliptic curve&lt;/b&gt;: BLS12-377&lt;/li&gt;&lt;li align=&quot;left&quot;&gt;&lt;font style=&quot;font-size: 12px;&quot;&gt;&lt;b&gt;software&lt;/b&gt;: gnark&lt;/font&gt;&lt;/li&gt;&lt;/ul&gt;" style="rounded=0;whiteSpace=wrap;html=1;fontFamily=Courier New;fillColor=#f5f5f5;fontColor=#333333;strokeColor=#666666;align=left;spacingLeft=-16;spacingBottom=-11;" vertex="1" parent="1"> + <mxGeometry x="440" y="100" width="220" height="100" as="geometry" /> + </mxCell> + <mxCell id="leIHP_gTSu-8pZ8RQmnW-17" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="1" source="leIHP_gTSu-8pZ8RQmnW-13" target="leIHP_gTSu-8pZ8RQmnW-14"> + <mxGeometry relative="1" as="geometry" /> + </mxCell> + <mxCell id="leIHP_gTSu-8pZ8RQmnW-13" value="&lt;div align=&quot;center&quot;&gt;&lt;font style=&quot;font-size: 12px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &lt;b&gt;aggregationCircuit&lt;/b&gt;&lt;/font&gt;&lt;/div&gt;&lt;ul&gt;&lt;li align=&quot;left&quot;&gt;&lt;b&gt;proof system&lt;/b&gt;: Groth16&lt;/li&gt;&lt;li align=&quot;left&quot;&gt;&lt;b&gt;elliptic curve&lt;/b&gt;: BW6-761&lt;/li&gt;&lt;li align=&quot;left&quot;&gt;&lt;font style=&quot;font-size: 12px;&quot;&gt;&lt;b&gt;software&lt;/b&gt;: gnark&lt;/font&gt;&lt;/li&gt;&lt;/ul&gt;" style="rounded=0;whiteSpace=wrap;html=1;fontFamily=Courier New;fillColor=#f5f5f5;fontColor=#333333;strokeColor=#666666;align=left;spacingLeft=-16;spacingBottom=-11;" vertex="1" parent="1"> + <mxGeometry x="720" y="100" width="220" height="100" as="geometry" /> + </mxCell> + <mxCell id="xqbpQ8ndT2nizzV8YaSw-9" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.588;entryDx=0;entryDy=0;entryPerimeter=0;" edge="1" parent="1" source="leIHP_gTSu-8pZ8RQmnW-14" target="xqbpQ8ndT2nizzV8YaSw-1"> + <mxGeometry relative="1" as="geometry" /> + </mxCell> + <mxCell id="leIHP_gTSu-8pZ8RQmnW-14" value="&lt;div align=&quot;center&quot;&gt;&lt;font style=&quot;font-size: 12px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;b&gt;stateTransitionCircuit&lt;/b&gt;&lt;/font&gt;&lt;/div&gt;&lt;ul&gt;&lt;li align=&quot;left&quot;&gt;&lt;b&gt;proof system&lt;/b&gt;: Groth16&lt;/li&gt;&lt;li align=&quot;left&quot;&gt;&lt;b&gt;elliptic curve&lt;/b&gt;: BN254&lt;/li&gt;&lt;li align=&quot;left&quot;&gt;&lt;font style=&quot;font-size: 12px;&quot;&gt;&lt;b&gt;software&lt;/b&gt;: gnark&lt;/font&gt;&lt;/li&gt;&lt;/ul&gt;" style="rounded=0;whiteSpace=wrap;html=1;fontFamily=Courier New;fillColor=#f5f5f5;fontColor=#333333;strokeColor=#666666;align=left;spacingLeft=-16;spacingBottom=-11;" vertex="1" parent="1"> + <mxGeometry x="1000" y="100" width="220" height="100" as="geometry" /> + </mxCell> + <mxCell id="leIHP_gTSu-8pZ8RQmnW-23" value="2" style="whiteSpace=wrap;html=1;aspect=fixed;" vertex="1" parent="1"> + <mxGeometry x="440" y="100" width="20" height="20" as="geometry" /> + </mxCell> + <mxCell id="leIHP_gTSu-8pZ8RQmnW-24" value="3" style="whiteSpace=wrap;html=1;aspect=fixed;" vertex="1" parent="1"> + <mxGeometry x="720" y="100" width="20" height="20" as="geometry" /> + </mxCell> + <mxCell id="leIHP_gTSu-8pZ8RQmnW-25" value="4" style="whiteSpace=wrap;html=1;aspect=fixed;" vertex="1" parent="1"> + <mxGeometry x="1000" y="100" width="20" height="20" as="geometry" /> + </mxCell> + <mxCell id="leIHP_gTSu-8pZ8RQmnW-28" value="&lt;b&gt;VOTER&lt;/b&gt;" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1"> + <mxGeometry x="240" y="60" width="60" height="30" as="geometry" /> + </mxCell> + <mxCell id="leIHP_gTSu-8pZ8RQmnW-31" value="&lt;b&gt;SEQUENCER&lt;/b&gt;" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1"> + <mxGeometry x="800" y="60" width="60" height="30" as="geometry" /> + </mxCell> + <mxCell id="xqbpQ8ndT2nizzV8YaSw-1" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#dae8fc;dashed=1;dashPattern=1 1;strokeColor=#6c8ebf;" vertex="1" parent="1"> + <mxGeometry x="1260" y="50" width="110" height="170" as="geometry" /> + </mxCell> + <mxCell id="xqbpQ8ndT2nizzV8YaSw-2" value="" style="shape=image;html=1;verticalAlign=top;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;imageAspect=0;aspect=fixed;image=https://cdn0.iconfinder.com/data/icons/phosphor-light-vol-2/256/currency-eth-light-128.png" vertex="1" parent="1"> + <mxGeometry x="1286" y="121" width="60" height="60" as="geometry" /> + </mxCell> + <mxCell id="xqbpQ8ndT2nizzV8YaSw-4" value="&lt;b&gt;PROCESS&lt;br&gt;MANAGEMENT&lt;/b&gt;" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1"> + <mxGeometry x="1260" y="60" width="110" height="50" as="geometry" /> + </mxCell> + </root> + </mxGraphModel> + </diagram> +</mxfile>
M v2/figures/mt-state-mermaid.mmd → v2/figures/mt-state-mermaid.mmd

@@ -5,10 +5,8 @@ ---

flowchart TB subgraph s1[" "] NInt[" "] - EInt[" "] n1[" "] EB["encrypted ballots [...]"] - A["commitments [...]"] V["bool"] end subgraph s2[" "]

@@ -19,28 +17,24 @@ P0["processID"]

P1["censusRoot"] P2["ballotMode"] P3["encryptionKey"] - P4["results add"] - P5["results sub"] + P4["resultsAdd"] + P5["resultsSub"] end - Root["root hash"] --> NInt & EInt & n1 & SI1 & SIA & SIB + Root["stateRoot"] --> NInt & n1 & SI1 & SIA & SIB SI1 -- 0x0 --> P0 SI1 -- 0x1 --> P1 SIA -- 0x2 --> P2 SIA -- 0x3 --> P3 SIB -- 0x4 --> P4 SIB -- 0x5 --> P5 - NInt -- nullifiers --> EB - EInt -- addresses --> A + NInt -- addresses --> EB n1 -- voteIDs --> V n2[" "] n1@{ shape: rect} n2@{ shape: text} NInt:::internal - EInt:::internal n1:::internal EB:::leaf - A:::leaf - A:::leaf V:::leaf V:::empty SI1:::internal
M v2/figures/protocol-intuition-flow.drawio → v2/figures/protocol-intuition-flow.drawio

@@ -1,6 +1,6 @@

-<mxfile host="app.diagrams.net" agent="Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:139.0) Gecko/20100101 Firefox/139.0" version="27.1.6" pages="2"> +<mxfile host="app.diagrams.net" agent="Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:138.0) Gecko/20100101 Firefox/138.0" version="28.0.4" pages="2"> <diagram name="protocol-flow" id="9_ijZpfl23uZW4xNUKwr"> - <mxGraphModel dx="196" dy="152" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1100" pageHeight="850" math="0" shadow="0"> + <mxGraphModel dx="1121" dy="545" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1100" pageHeight="850" math="0" shadow="0"> <root> <mxCell id="Iu_7Bu9hSgdt7ye1YoMF-0" /> <mxCell id="Iu_7Bu9hSgdt7ye1YoMF-1" parent="Iu_7Bu9hSgdt7ye1YoMF-0" />

@@ -215,36 +215,33 @@ </mxCell>

<mxCell id="srKLONURFAAzG-BD-hus-1" value="organizer" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" parent="gYZxT68eDZA619NTKZw1-5" vertex="1"> <mxGeometry y="70" width="80" height="30" as="geometry" /> </mxCell> - <mxCell id="Iu_7Bu9hSgdt7ye1YoMF-18" value="" style="shape=image;html=1;verticalAlign=top;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;imageAspect=0;aspect=fixed;image=https://cdn1.iconfinder.com/data/icons/business-and-finance-20/200/vector_65_02-128.png" parent="gYZxT68eDZA619NTKZw1-5" vertex="1"> - <mxGeometry x="10" y="10" width="60" height="60" as="geometry" /> - </mxCell> - <mxCell id="Xpk0SvLKABjG2myerGQv-11" value="" style="group" vertex="1" connectable="0" parent="gYZxT68eDZA619NTKZw1-5"> + <mxCell id="Xpk0SvLKABjG2myerGQv-11" value="" style="group" parent="gYZxT68eDZA619NTKZw1-5" vertex="1" connectable="0"> <mxGeometry x="13" y="20" width="55" height="58" as="geometry" /> </mxCell> - <mxCell id="Xpk0SvLKABjG2myerGQv-10" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#F5F5F5;strokeColor=#818C80;" vertex="1" parent="Xpk0SvLKABjG2myerGQv-11"> + <mxCell id="Xpk0SvLKABjG2myerGQv-10" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#F5F5F5;strokeColor=#818C80;" parent="Xpk0SvLKABjG2myerGQv-11" vertex="1"> <mxGeometry y="15.820482519135288" width="55" height="31.631474646837457" as="geometry" /> </mxCell> - <mxCell id="Xpk0SvLKABjG2myerGQv-2" value="" style="verticalLabelPosition=bottom;verticalAlign=top;html=1;shape=mxgraph.basic.acute_triangle;dx=0.5;fillColor=#F5F5F5;strokeColor=#666666;" vertex="1" parent="Xpk0SvLKABjG2myerGQv-11"> + <mxCell id="Xpk0SvLKABjG2myerGQv-2" value="" style="verticalLabelPosition=bottom;verticalAlign=top;html=1;shape=mxgraph.basic.acute_triangle;dx=0.5;fillColor=#F5F5F5;strokeColor=#666666;" parent="Xpk0SvLKABjG2myerGQv-11" vertex="1"> <mxGeometry width="55" height="15.81731905532426" as="geometry" /> </mxCell> - <mxCell id="Xpk0SvLKABjG2myerGQv-3" value="" style="swimlane;startSize=0;fillColor=#F5F5F5;strokeColor=#666666;" vertex="1" parent="Xpk0SvLKABjG2myerGQv-11"> + <mxCell id="Xpk0SvLKABjG2myerGQv-3" value="" style="swimlane;startSize=0;fillColor=#F5F5F5;strokeColor=#666666;" parent="Xpk0SvLKABjG2myerGQv-11" vertex="1"> <mxGeometry y="15.820482519135288" width="55" height="31.631474646837457" as="geometry"> <mxRectangle y="15.002999999999963" width="50" height="40" as="alternateBounds" /> </mxGeometry> </mxCell> - <mxCell id="Xpk0SvLKABjG2myerGQv-4" value="" style="endArrow=none;html=1;rounded=0;exitX=0.25;exitY=1;exitDx=0;exitDy=0;entryX=0.25;entryY=0;entryDx=0;entryDy=0;strokeColor=#666666;" edge="1" parent="Xpk0SvLKABjG2myerGQv-11" source="Xpk0SvLKABjG2myerGQv-3" target="Xpk0SvLKABjG2myerGQv-3"> + <mxCell id="Xpk0SvLKABjG2myerGQv-4" value="" style="endArrow=none;html=1;rounded=0;exitX=0.25;exitY=1;exitDx=0;exitDy=0;entryX=0.25;entryY=0;entryDx=0;entryDy=0;strokeColor=#666666;" parent="Xpk0SvLKABjG2myerGQv-11" source="Xpk0SvLKABjG2myerGQv-3" target="Xpk0SvLKABjG2myerGQv-3" edge="1"> <mxGeometry width="50" height="50" relative="1" as="geometry"> <mxPoint x="-16.5" y="42.17951748086471" as="sourcePoint" /> <mxPoint x="11" y="15.817319055324228" as="targetPoint" /> </mxGeometry> </mxCell> - <mxCell id="Xpk0SvLKABjG2myerGQv-5" value="" style="endArrow=none;html=1;rounded=0;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=1;entryDx=0;entryDy=0;entryPerimeter=0;strokeColor=#666666;" edge="1" parent="Xpk0SvLKABjG2myerGQv-11" source="Xpk0SvLKABjG2myerGQv-3" target="Xpk0SvLKABjG2myerGQv-2"> + <mxCell id="Xpk0SvLKABjG2myerGQv-5" value="" style="endArrow=none;html=1;rounded=0;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=1;entryDx=0;entryDy=0;entryPerimeter=0;strokeColor=#666666;" parent="Xpk0SvLKABjG2myerGQv-11" source="Xpk0SvLKABjG2myerGQv-3" target="Xpk0SvLKABjG2myerGQv-2" edge="1"> <mxGeometry width="50" height="50" relative="1" as="geometry"> <mxPoint x="49.5" y="94.90391433194557" as="sourcePoint" /> <mxPoint x="49.5" y="63.269276221297005" as="targetPoint" /> </mxGeometry> </mxCell> - <mxCell id="Xpk0SvLKABjG2myerGQv-6" value="" style="endArrow=none;html=1;rounded=0;exitX=0.75;exitY=1;exitDx=0;exitDy=0;entryX=0.75;entryY=0;entryDx=0;entryDy=0;strokeColor=#666666;" edge="1" parent="Xpk0SvLKABjG2myerGQv-11" source="Xpk0SvLKABjG2myerGQv-3" target="Xpk0SvLKABjG2myerGQv-3"> + <mxCell id="Xpk0SvLKABjG2myerGQv-6" value="" style="endArrow=none;html=1;rounded=0;exitX=0.75;exitY=1;exitDx=0;exitDy=0;entryX=0.75;entryY=0;entryDx=0;entryDy=0;strokeColor=#666666;" parent="Xpk0SvLKABjG2myerGQv-11" source="Xpk0SvLKABjG2myerGQv-3" target="Xpk0SvLKABjG2myerGQv-3" edge="1"> <mxGeometry width="50" height="50" relative="1" as="geometry"> <mxPoint x="60.5" y="94.90391433194557" as="sourcePoint" /> <mxPoint x="60.5" y="63.269276221297005" as="targetPoint" />
M v2/sections/ballot-protocol.tex → v2/sections/ballot-protocol.tex

@@ -4,6 +4,8 @@ \martai{It is not clear what is the advantage of defining a protocol like this. Is it easy because it is easy to implement as an arithmetic circuit? Make the advantage clear.}

\martai{Yes. The advantage is that we can define many types of voting systems (or recounting) with just these few variables. Moreover, we avoid if-else statements, which makes it very convenient to implement in-circuit. More info here: \url{https://docs.vocdoni.io/architecture/data-schemes/ballot-protocol.html\#vocdoni-results-interpretation} (no multiple question supported).} +\martai{It is called Ballot Mode because we define some modes (like quadratic, etc.) that can be chosen by the organizer. Essentially, each of this modes has a special configuration, but in order to make it easier, the organizer only needs to choose which of the modes (configs) to apply.} + \martai{How is the voter's $\weight$ encoded as part of the ballot?} The \davinci ballot protocol is a simple and efficient mechanism for casting and tallying votes in any type of election or collective decision-making process. Each voting process consists of one or several fields and voters are required to provide a response for each of these fields in their ballot.
M v2/sections/cryptographic-primitives.tex → v2/sections/cryptographic-primitives.tex

@@ -374,13 +374,15 @@

\noi To each Merkle tree $\tree$, we associate the following functions: \begin{itemize} +% \item ${\tree.\hlset{\MTGenerate}}(data)$: given a set of data, instantiate the tree. \item ${\tree.\hlset{\MTRoot}}()$: it returns the root of the tree. - \item ${\tree.\hlset{\MTInsert}}()$: it inserts a new leaf in the tree. The root is updated. + \item ${\tree.\hlset{\MTInsert}}(path, \leaf)$: efectivament, el path se segueix per it inserts a new leaf in the tree. + \item ${\tree.\hlset{\MTUpdate}}(\leaf[old], \leaf)$: given an old leaf in the tree, it updates the leaf content to \leaf. % \item ${\tree.\hlset{\MTRemove}}()$: it removes a leaf from the tree. The root is updated. - \item ${\tree.\hlset{\MTProof}}()$: it returns the Merkle tree inclusion proof of the given leaf. + \item ${\tree.\hlset{\MTMembershipProof}}(\leaf)$: it returns the Merkle tree inclusion proof of the given \leaf. + \item ${\tree.\hlset{\MTNonMembershipProof}}(\leaf)$: it returns the Merkle tree non-inclusion proof of the given \leaf. % \item ${\MT.\UpdateRoot}_{\pp}({\leaf, \pos, \root})$: it updates the root. - \item ${\tree.\hlset{\MTVerify}} - ()$: it takes a Merkle proof and a root as an input and verifies the proof against the given root. + \item ${\tree.\hlset{\MTVerify}}(\leaf, proof, root)$: it takes a Merkle proof and a root as an input and verifies the proof of the leaf against the given root. \end{itemize} \martai{\textbf{(1) State MT:} Poseidon with BN254 scalar field. \textbf{(2) Census MT:} MiMC with BLS12-377 scalar field.}

@@ -388,6 +390,8 @@

\martai{Sparse MTs (binary) with depth $64$. Structure of sparse MT from iden3.} \martai{Add MT.Update, for those ciphertexts that are overwrites.} + +\martai{Clarify leaf -- if hash of the leaf or address as path.} \subsection{Zero-knowledge proof systems} \label{sec:cryptographic-primitives:zkp}
M v2/sections/vocdoni-protocol.tex → v2/sections/vocdoni-protocol.tex

@@ -26,7 +26,12 @@ %\end{itemize}}

\subsubsection{Census Merkle tree} + +\martai{The Path corresponds to the voter's Address (e.g., their Ethereum address or any unique identifier). The Leaf Value stores the voting Weight assigned to that address.} + The census represents the list of eligible voters and their associated voting weights. It is implemented as a binary Merkle tree using an iden3 Sparse Merkle Tree (SMT) structure with a zkSNARK-friendly hashing function to ensure compatibility with zero-knowledge circuits. Each leaf in the tree corresponds to a unique voter address (e.g., Ethereum address), and stores the associated voting weight. This construction enables efficient Merkle proofs that allow voters to prove their eligibility and weight without revealing the full census dataset. + +$\hlset{\censusTree}$ The organizer is responsible for generating the census and computing its Merkle root, which is then committed on-chain. To minimize on-chain storage, the full census is distributed off-chain—e.g., via IPFS or a trusted HTTPS endpoint—allowing verifiers and sequencers to independently access the dataset and reconstruct Merkle proofs as needed.

@@ -54,17 +59,20 @@

\subsubsection{State Merkle tree} Explain what it is and the structure. Below, the original text: The State tree contains some special addresses (indices) for storing some required data regarding the voting process: +$\hlset{\stateTree}$ + \begin{itemize} \item Address \texttt{0x0}: it stores \processid, a unique identifier for the voting process. - \item Address \texttt{0x1}: it stores \censusroot and \type, which contains the necessary information to validate vote proofs. - \martai{they type was a field in case the organization was using a different structure for the census than a MT.} + \item Address \texttt{0x1}: it stores the \censusroot. %and \type, which contains the necessary information to validate vote proofs. +% \martai{they type was a field in case the organization was using a different structure for the census than a MT.} \item Address \texttt{0x2}: it stores \ballotmode, which encodes rules for validating votes, such as the maximum number of selectable options. \item Address \texttt{0x3}: it stores the \epk, which is the public key used to encrypt the votes. - \item Address \texttt{0x4}: it stores the \addaccumulator. That is, the aggregated encrypted voting results that need to be added. - \item Address \texttt{0x5}: it stores the \substractaccumulator. That is, it stores the aggregated encrypted voting results that need to be subtracted. - \item Any address: vote \addresses: are stored within the State tree pointing to a voter's encrypted ballot. Addresses are used as indexes (i.e. path to the leaf that stores encrypted ballots). - \item \textbf{voteIDs??} + \item Address \texttt{0x4}: it stores the \addaccumulator, which is the aggregated encrypted voting results that need to be added. + \item Address \texttt{0x5}: it stores the \substractaccumulator, which is the aggregated encrypted voting results that need to be subtracted. \end{itemize} + +The rest of addresses: vote \addresses: are stored within the State tree pointing to a voter's encrypted ballot. Addresses are used as indexes (i.e. path to the leaf that stores encrypted ballots). +And voteIDs also stored within the State tree, pointing to empty leafs. \begin{figure}[h] \centerline{\includegraphics[width=400pt,draft=false]{\figs/mt-state-mermaid}}

@@ -72,7 +80,7 @@ \caption{Structure of the state Merkle tree (FIGURE SHOULD BE udpated!).}

\label{fig:mt-state} \end{figure} -\textbf{The Initial State}: The voting process begins with an initial state where the Merkle Tree Root is established and published on the Process Management smart contract. Predefined parameters are included, but the results are initialized to zero, and no nullifiers are present. The Process Organizer transaction, contains the initial root and the necessary Merkle proofs. These proofs verify that the initial parameters are correct according to the voting process information and that no additional information is stored. Since the `ProcessId` of the initial state is a unique identifier, there won't be duplicate roots for different processes. +\textbf{The Initial State}: The voting process begins with an initial state where the Merkle Tree Root is established and published on the Process Management smart contract. Predefined parameters are included, but the results are initialized to zero, and no nullifiers are present. The Process Organizer transaction, contains the initial root and the necessary Merkle proofs. These proofs verify that the initial parameters are correct according to the voting process information and that no additional information is stored. Since the \processid of the initial state is a unique identifier, there won't be duplicate roots for different processes. \subsection{Smart contracts}

@@ -95,15 +103,8 @@ \martai{\textbf{About the circuits: in practice (and for optimization), all public inputs $PI$ are private, and we produce a single public input $h = Hash(PI)$. Then, the verifier checks that $Hash(PI) = h$ and verifies the proof only against $h$.} For this, we use the MiMC-7 hash function. Since this is an implementation detail, I propose to write this as a footnote or as an introduction to this section.}

\textit{Old text: By structuring the process this way, we ensure that voting can be performed from any device-including smartphones and web browsers-while keeping the sequencer's computational requirements within the capabilities of accessible, CPU-based machines with 64 GiB of memory.} -\martai{I don't follow the above paragraph.} - -\martai{It is called Ballot Mode because we define some modes (like quadratic, etc.) that can be chosen by the organizer. Essentially, each of this modes has a special configuration, but in order to make it easier, the organizer only needs to choose which of the modes (configs) to apply.} - -\martai{It's convenient to name the proof associated to each circuit: a proof for this circuit is called [...].\\ -Answer: 1. ballotProof, 2. voteVerifier, 3. aggregator, 4. stateTransition.} - \begin{figure}[h] - \centerline{\includegraphics[width=350pt,draft=false]{\figs/circuits-flow}} + \centerline{\includegraphics[width=\linewidth,draft=false]{\figs/circuits-flow-v2}} \caption{Circuits flow.} \label{fig:circuits-flow} \end{figure}

@@ -374,8 +375,8 @@ \label{sec:vocdoni-protocol:start}

\organizer \begin{enumerate} - \item Prepares the census data \censusdata and generates census Merkle tree. - \item Generates the census commitment: $\censusroot = \hlget{\MTRoot}()$. + \item Prepares the census data \censusdata and generates census Merkle tree $\hlget{\censusTree}$. + \item Generates the census commitment: $\censusroot = \hlget{\censusTree}.\hlget{\MTRoot}()$. \martai{Additionally, after this step, the organizer should make a Merkle proof available to all eligible voters.} \item Set voting details: {\color{blue}duration, options, type, etc. + CENSUS MT ROOT.} \item Compute the process identifier \processid, which is a unique 32-byte number derived from the organizer's Ethereum address and nonce, and the chain ID.

@@ -418,21 +419,19 @@ \label{eq-voteid}

\voteid = \hlget{\Multimimc}(\processid \conc \address \conc k). \end{equation} \item Generate ZK-SNARK of satisfiability of circuit from Fig.~\ref{fig:circuit-voter} with the proof system from Section~\ref{sec:cryptographic-primitives:zkp} to prove that Eqs.~\labelcref{eq-ciphertext,eq-voteid} are correctly computed, and that $\ballot$ satisfies ballot protocol rules according to $\ballotmode$. - \[ \voteproof = \text{Prove(), Circuit()}.\] + \[ \voteproof = \text{Prove(), Circuit(), PublicInputs}.\] \item Sign $\voteid$ using the user's secret key $\sk$ to authenticates the vote and ensure that was cast by a legitimate voter: \[ \signature = \hlget{\SSign}_{\sk}(\voteid).\] - \item Send the following data, which includes the encrypted vote, census membership proof, signature and vote proof, to the selected sequencer: + \item Send the following data, which includes the encrypted vote, census membership proof, signature\footnote{Note that the address is not send because it can be recomputed from the signature.} and vote proof, to the selected sequencer: \[ \vote = [ \processid, \voteid, \encryptedballot, \censuspf, \voteproof, \signature ]. \] \end{itemize} -\martai{\\ - 1. Add as a footnote that the address is not send because it can be recomputed from the signature.\\ - 2. In the code, they call it \textit{vote}, \textit{verifierVote}. Alternative: \textit{envelope}.} - \noi \sequencers \begin{itemize} \item Fetch current state: retrieve the current valid process state root from the process management smart contract and the associated data from Ethereum blobs. + \item $\censusroot = \hlget{\censusTree}.\hlget{\MTRoot}()$. + \item $\stateroot = \hlget{\stateTree}.\hlget{\MTRoot}()$. \item Generate a SK-SNARK proof of state transition proving: \begin{itemize} \item the validity of the ZK-SNARK proof provided by the voter,