ported overleaf version to GH + applied changes and suggestions
jump to
@@ -1,2 +1,49 @@
-# davinci-paper -Davinci Paper +# DAVINCI + +This repository contains the academic paper describing the DAVINCI protocol for decentralized, verifiable, and privacy-preserving digital voting. + +## Overview + +As part of the ongoing [Vocdoni](https://vocdoni.io/) project, DAVINCI builds upon years of research and development in decentralized governance, introducing a new protocol architecture that combines: + +- **Zero-knowledge proofs (ZK-SNARKs)** for verifiable computation, +- **Threshold homomorphic encryption** for private tallying, +- **Ethereum smart contracts** for transparent coordination. + +The protocol provides end-to-end verifiability, receipt-freeness, and decentralized trust, enabling secure and scalable digital elections. + +## Repository structure + +``` +├── LICENSE +├── README.md +├── v1/ # Early draft version +└── v2/ # Main paper source (current version) + ├── build/ # Compiled files and LaTeX class/style files + ├── figures/ # Diagrams and illustrations (.png, .drawio, .mmd) + ├── sections/ # Individual .tex files for each section + ├── bibliography/ # References (bibtex.bib) + └── misc/ # Miscellaneous materials (links, notes) +``` + +--- + +## Building the paper + +To compile the paper locally: + +```bash +cd v2/build +pdflatex main.tex +bibtex main +pdflatex main.tex +pdflatex main.tex +``` + +The compiled file will be available at `v2/build/main.pdf`. + +## Citation + +If you use or reference this work, please cite: + +> Escrich, P., Bellés-Muñoz, M., Piñana, J., Menéndez, L., Baig, R., & Muñoz-Tapia, J. L. (2025). *DAVINCI: Decentralized autonomous vote integrity network with cryptographic inference.*
@@ -1,3 +1,10 @@
+@misc{todocitaton, + author = {{AAAATODOauthor}}, + title = {{TODOtitle remove it when cryptographic-primitives.tex "encryption key pair used for ballots encryption~\cite{todocitaton}." fixed}}, + url = {TODOurl}, + year = 9999 +} + @misc{nakamoto2012bitcoin, author = {Nakamoto, Satoshi}, title = {Bitcoin: A peer-to-peer electronic cash system},@@ -89,6 +96,16 @@ pages={33--62},
year={2018}, organization={Springer} } + +@INPROCEEDINGS{canetti2001universally, + author = {Canetti, Ran}, + booktitle = {Proceedings 42nd IEEE Symposium on Foundations of Computer Science}, + title = {Universally composable security: a new paradigm for cryptographic protocols}, + year = {2001}, + volume = {}, + number = {}, + pages = {136-145}, + doi = {10.1109/SFCS.2001.959888}} @misc{rfc7693, series = {Request for Comments},@@ -465,6 +482,13 @@ author = {Alex Vlasov and hujw77},
title = {{EIP-2539}: {BLS12-377} curve operations [{DRAFT}], {E}thereum {I}mprovement {P}roposals, no. 2539, [Online serial]}, url = {https://eips.ethereum.org/EIPS/eip-2539}, year = {February 2020} +} + +@misc{eip4844, + author = {Vitalik Buterin and Dankrad Feist and Diederik Loerakker and George Kadianakis and Matt Garnett and Mofi Taiwo and Ansgar Dietrichs}, + title = {{EIP-4844}: Shard Blob Transactions, {E}thereum {I}mprovement {P}roposals, no. 4844, [Online serial]}, + url = {https://eips.ethereum.org/EIPS/eip-4844}, + year = {February 2022} } @misc{baylina19sparse,
@@ -0,0 +1,12 @@
+% !TeX root = main.tex + +\begin{acronym} + \acro{BFT}{byzantine fault tolerant} + \acro{CRS}{common reference string} + \acro{EVM}{Ethereum virtual machine} + \acro{IPFS}{interplanetary file system} + \acro{MPC}{multi-party computation} + \acro{ZK}{zero-knowledge} + \acro{ZKP}{zero-knowledge proofs} + \acro{ZK-SNARK}{zero-knowledge succinct non-interactive argument of knowledge} +\end{acronym}
@@ -4,28 +4,18 @@ %\documentclass{article}
\input{preamble-packages} \input{preamble-macros} - +\input{acronyms.tex} -\usepackage{rotating} -\usepackage{booktabs} -\usepackage{multirow} -\usepackage{makecell} -\usepackage{array} - -\title{\Davinci: Decentralized autonomous vote integrity network\\ with cryptographic inference} -% -%Pau Escrich -%Marta Bellés-Muñoz -%Jordi Piñana -%Jose Muñoz -%\author{Authors: Pau Escrich and Jordi Piñana from Vocdoni Association} -%\institute{Last update: \today} +%% to avoid `Package hyperref Warning: Token not allowed in a PDF string (Unicode): removing `\\' on input line` error. In any case, `\\` should not be used outside tables. +%\title{\Davinci: Decentralized autonomous vote integrity network\\ with cryptographic inference} +\title{\Davinci: Decentralized autonomous vote integrity network \texorpdfstring{\\ with cryptographic inference}{}} \author{ Pau Escrich\inst{1} \and Marta Bellés\inst{2} \and Jordi Piñana\inst{1} \and Lucas Menéndez\inst{1} \and + Roger Baig\inst{3} \and Jose Luis~Muñoz-Tapia\inst{3} }@@ -34,8 +24,8 @@ Vocdoni Association -- \email{\{pau,painan,lucas\}@vocdoni.org}
\and Institution -- \email{email@email.com} \and - Polytechnic University of Catalonia -- \email{jose.luis.munoz@upc.edu} - \\ + Polytechnic University of Catalonia -- \email{\{roger.baig,jose.luis.munoz\}@upc.edu} +% \\ % Last update: \today } % election, vote, polling, ballot, selection, decision-making process@@ -54,10 +44,10 @@ \thispagestyle{plain}
%\addcontentsline{toc}{section}{\protect\numberline{}Abstract} \begin{abstract} - \Davinci is the evolution of the Vocdoni voting protocol, designed to empower civil society by providing essential tools for secure, verifiable, and anonymous digital voting. Leveraging recent advancements in zero-knowledge (ZK) proof systems and blockchain technology, \davinci transitions to a specialized ZK-rollup system that inherits network security from settlement layers like Ethereum mainnet. The system relies on cryptographic proofs to ensure integrity and security, eliminating the need for centralized authorities. By integrating ZK-SNARKs and threshold homomorphic encryption, \davinci enables end-to-end verifiability, privacy, and trustlessness in the voting process. The protocol employs a distributed key generation among sequencers, coordinated via Ethereum smart contracts, and uses Ethereum data blobs for data availability. With a focus on accessibility, scalability, receipt-freeness, and automation, \davinci aims to facilitate high-frequency and low-cost voting, fostering mass adoption of e-voting and simplifying civil participation. Moreover, the introduction of the Vocdoni token aligns incentives among participants, ensuring the system's sustainability and enabling decentralized governance. + \Davinci is the evolution of the Vocdoni voting protocol, designed to empower civil society by providing essential tools for secure, verifiable, and anonymous digital voting. Using recent advancements in \ac{ZK} proof systems and blockchain technology, \davinci transitions to a specialized \ac{ZK} roll-up system that inherits network security from settlement layers such as the Ethereum mainnet. The system relies on cryptographic proofs to ensure integrity and security, eliminating the need for centralized authorities. By integrating \acsp{ZK-SNARK} and threshold homomorphic encryption, \davinci enables end-to-end verifiability, privacy, and trustlessness in the voting process. The protocol employs distributed key generation among sequencers, coordinated through Ethereum smart contracts, and uses Ethereum data blobs for data availability. With a focus on accessibility, scalability, receipt-freeness, and automation, \davinci aims to facilitate high-frequency and low-cost voting, fostering mass adoption of voting and simplifying civil participation. Moreover, the introduction of the Vocdoni token aligns incentives among participants, ensuring the system's sustainability and enabling decentralized governance. % - Finally, the design of \davinci is grounded in practicality; all components are implemented using current technologies and have undergone proof-of-concept testing. %This ensures that - In sum, the proposed architecture is not merely theoretical but a viable solution ready for short-term deployment. + Finally, the design of \davinci is grounded in practicality; All components are implemented using current technologies and have undergone proof-of-concept testing. %This ensures that + In sum, the proposed architecture is not merely theoretical, but a viable solution ready for short-term deployment. The source code has been made open source, allowing practitioners and researchers to further investigate its details and potential for future uses. % \freefootnote{\scriptsize{Authors are listed in alphabetical order (\url{https://www.ams.org/profession/leaders/CultureStatement04.pdf}).}} \end{abstract}@@ -67,15 +57,23 @@
\vspace{0.2cm} \noi Pieces of text marked in \textbf{blue} are heavily work in progress. In addition, there are these general tasks: - \begin{itemize} - \item Consider separating the roles of the sequencers from key generators. - \item Change $(C_1, C_2)$ to \texttt{ciphertext} (in protocol flow and figures). - \item Notation: are voteIDs called Nullifiers? + \item Change $(C_1, C_2)$ to \texttt{ciphertext} in protocol flow and figures. + \item Notation considerations: + \begin{itemize} + \item From \textit{address} to \textit{nullifier} (if you think of an address as a token that allows voters to vote). + \item From \textit{IPFS} to \textit{bulletin board}. + \item From \textit{aggregation/accumulation} (in aggregation circuit) to \textit{batching}. + \end{itemize} + \item Check circuits and smart contracts names. \item Consider scenario where deterministic signature (no Eth compatible) can be used as nullifier. - \item Do new circuit1 + circuit2. + \item Add a section with vulnerabilities. + \item Do new circuit1 + circuit2. \item Do last results circuit. \item Add citations. + \item Add everything related to data blobs. + \item Add a note on blank/null votes. + \item \textbf{Important change:} sequencers do not register in any smart contract. \end{itemize} }}}@@ -121,7 +119,7 @@ \section{Ballot protocol}
\label{sec:ballot-protocol} \input{\secs/ballot-protocol} -\section{Vocdoni token} %Protocol incentives +\section{Incentive mechanisms} %Protocol incentives \label{sec:token} \input{\secs/token}@@ -148,6 +146,8 @@
\bibliographystyle{splncs04} \bibliography{\bib/bibtex} -% ---- Temporary section: circuit details ---- +% READS +% 1. Benaloh (2006), “Simple Verifiable Elections.” Classic formulation of end-to-end verifiability ideas. (USENIX/EVT proceedings). https://www.usenix.org/legacy/event/evt06/tech/full_papers/benaloh/benaloh.pdf +% 2. Benaloh, J. and Tuinstra, D. “Receipt-Free Secret-Ballot Elections” Proceedings of the 26th ACM Symposium on Theory of Computing. Montreal, PQ (May 1994) 544–553. https://dl.acm.org/doi/pdf/10.1145/195058.195407 (<-- definitions of receipt-freeness, privacy, uncoercibility, correctness). \end{document}
@@ -4,6 +4,8 @@ % Doc sytle
\setcounter{secnumdepth}{3} %enumerate sections up to depth 3 (subsubsection) % Set the first-level itemize label to use math mode \bullet \setlist[itemize,1]{label=$\bullet$} +% The second-level enumerates (enumerate,2) should only show (a) when referenced (not (3a)). +\setlist[enumerate,2]{label=(\alph*),ref=\alph*} % Working directory \newcommand{\definedir}[2]{\newcommand{#1}{#2}}@@ -14,10 +16,10 @@
% Comments \newcommand{\marta}[1]{\todo[size=\small, color=red!40]{\textbf{Marta}: #1}} \newcommand{\martai}[1]{\todo[inline, size=\small, color=red!40]{\textbf{Marta}: #1}} -\newcommand{\pau}[1]{\todo[size=\small, color=blue!40]{\textbf{Pau}: #1}} -\newcommand{\paui}[1]{\todo[inline, size=\small, color=blue!40]{\textbf{Pau}: #1}} -\newcommand{\jordi}[1]{\todo[size=\small, color=green!40]{\textbf{Jordi}: #1}} -\newcommand{\jordii}[1]{\todo[inline, size=\small, color=green!40]{\textbf{Jordi}: #1}} +\newcommand{\pau}[1]{\todo[size=\small, color=green!40]{\textbf{Pau}: #1}} +\newcommand{\paui}[1]{\todo[inline, size=\small, color=green!40]{\textbf{Pau}: #1}} +\newcommand{\roger}[1]{\todo[size=\small, color=blue!40]{\textbf{Roger}: #1}} +\newcommand{\rogeri}[1]{\todo[inline, size=\small, color=blue!40]{\textbf{Roger}: #1}} % Freefootnote \let\svthefootnote\thefootnote@@ -127,8 +129,10 @@ \newcommand{\minvaluesum}{\ballotstyle{minValueSum}}
\newcommand{\costexponent}{\ballotstyle{costExponent}} \newcommand{\totalvaluesum}{\ballotstyle{totalValueSum}} \newcommand{\validvote}{\ballotstyle{validVote}} + % Voting protocol \newcommand{\variablestyle}[1]{\texttt{#1}\xspace} +\newcommand{\true}{\variablestyle{true}} \newcommand{\census}{\variablestyle{census}} \newcommand{\censusdata}{\variablestyle{censusData}} \newcommand{\voteproof}{\variablestyle{voteProof}}@@ -231,6 +235,10 @@
% Misc \newcommand{\davinci}{DAVINCI\xspace} \newcommand{\Davinci}{DAVINCI\xspace} +\newcommand{\keywarden}{key warden\xspace} +\newcommand{\Keywarden}{Key warden\xspace} +\newcommand{\keywardens}{key wardens\xspace} +\newcommand{\Keywardens}{Key wardens\xspace} % Draft watermark %\ifdraft{\SetWatermarkScale{4}}{\SetWatermarkScale{0}}
@@ -4,7 +4,15 @@ \usepackage[T1]{fontenc}
\usepackage[margin=1in]{geometry} \usepackage{graphicx} \usepackage{authblk} -%S\usepackage[ruled,vlined]{algorithm2e} +%\usepackage[ruled,vlined]{algorithm2e} + +\usepackage{rotating} +\usepackage{booktabs} +\usepackage{multirow} +\usepackage{makecell} +\usepackage{array} + +\usepackage[nolist]{acronym} %consider `[printonlyused]` option \usepackage{float}@@ -26,7 +34,6 @@ \usepackage{enumitem}
\usepackage{multirow} \usepackage{ifdraft} %\usepackage{draftwatermark} - \usepackage{setspace}
@@ -1,4 +1,4 @@
-<mxfile host="app.diagrams.net" agent="Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:138.0) Gecko/20100101 Firefox/138.0" version="27.1.6" pages="6"> +<mxfile host="app.diagrams.net" agent="Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:143.0) Gecko/20100101 Firefox/143.0" version="28.1.1" pages="6"> <diagram name="1. voter-circuit" id="-BY3RIMELlOST2Ke_Soi"> <mxGraphModel dx="945" dy="517" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1100" pageHeight="850" math="1" shadow="0"> <root>@@ -958,114 +958,114 @@ </mxCell>
</root> </mxGraphModel> </diagram> - <diagram name="Copy of 4. state-transition-circuit" id="vOdGFxvcKQLxlt7TpMJr"> - <mxGraphModel dx="4453" dy="2198" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1100" pageHeight="850" math="1" shadow="0"> + <diagram name="Copy of 4." id="SfqXgv12DMmRO-l3Q4tj"> + <mxGraphModel dx="2264" dy="1396" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1100" pageHeight="850" math="1" shadow="0"> <root> - <mxCell id="bshJnAdmZ42-ucYETjzj-0" /> - <mxCell id="bshJnAdmZ42-ucYETjzj-1" parent="bshJnAdmZ42-ucYETjzj-0" /> - <mxCell id="w6cd1Epp7pFjK3pMSPcm-0" value="<div><br></div>" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;" vertex="1" parent="bshJnAdmZ42-ucYETjzj-1"> - <mxGeometry x="-380" y="-300" width="1990" height="1330" as="geometry" /> + <mxCell id="ZHVPnpmu-zi4kkNDXHjC-0" /> + <mxCell id="ZHVPnpmu-zi4kkNDXHjC-1" parent="ZHVPnpmu-zi4kkNDXHjC-0" /> + <mxCell id="ZHVPnpmu-zi4kkNDXHjC-2" value="<div><br></div>" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;" vertex="1" parent="ZHVPnpmu-zi4kkNDXHjC-1"> + <mxGeometry x="-390" y="-340" width="1990" height="1380" as="geometry" /> </mxCell> - <mxCell id="w6cd1Epp7pFjK3pMSPcm-1" value="<div><br></div>" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;" vertex="1" parent="bshJnAdmZ42-ucYETjzj-1"> - <mxGeometry x="-240" y="-10" width="1800" height="925" as="geometry" /> + <mxCell id="ZHVPnpmu-zi4kkNDXHjC-3" value="<div><br></div>" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;" vertex="1" parent="ZHVPnpmu-zi4kkNDXHjC-1"> + <mxGeometry x="-250" y="-60" width="1800" height="980" as="geometry" /> </mxCell> - <mxCell id="bshJnAdmZ42-ucYETjzj-4" value="" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;fontFamily=Courier New;fontStyle=1;dashed=1;" vertex="1" parent="bshJnAdmZ42-ucYETjzj-1"> - <mxGeometry x="280" y="380" width="1040" height="500" as="geometry" /> + <mxCell id="ZHVPnpmu-zi4kkNDXHjC-4" value="" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;fontFamily=Courier New;fontStyle=1;dashed=1;" vertex="1" parent="ZHVPnpmu-zi4kkNDXHjC-1"> + <mxGeometry x="280" y="330" width="1040" height="550" as="geometry" /> </mxCell> - <mxCell id="bshJnAdmZ42-ucYETjzj-5" value="" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;fontFamily=Courier New;fontStyle=1;dashed=1;" vertex="1" parent="bshJnAdmZ42-ucYETjzj-1"> + <mxCell id="ZHVPnpmu-zi4kkNDXHjC-5" value="" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;fontFamily=Courier New;fontStyle=1;dashed=1;" vertex="1" parent="ZHVPnpmu-zi4kkNDXHjC-1"> <mxGeometry x="290" y="480" width="160" height="60" as="geometry" /> </mxCell> - <mxCell id="bshJnAdmZ42-ucYETjzj-6" value="" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;fontFamily=Courier New;fontStyle=1;dashed=1;" vertex="1" parent="bshJnAdmZ42-ucYETjzj-1"> - <mxGeometry x="915" y="394" width="355" height="113" as="geometry" /> + <mxCell id="ZHVPnpmu-zi4kkNDXHjC-6" value="" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;fontFamily=Courier New;fontStyle=1;dashed=1;" vertex="1" parent="ZHVPnpmu-zi4kkNDXHjC-1"> + <mxGeometry x="915" y="347" width="355" height="113" as="geometry" /> </mxCell> - <mxCell id="bshJnAdmZ42-ucYETjzj-7" value="" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="bshJnAdmZ42-ucYETjzj-1"> - <mxGeometry x="320" y="-260" width="380" height="230" as="geometry" /> + <mxCell id="ZHVPnpmu-zi4kkNDXHjC-7" value="" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="ZHVPnpmu-zi4kkNDXHjC-1"> + <mxGeometry x="320" y="-310" width="380" height="230" as="geometry" /> </mxCell> - <mxCell id="bshJnAdmZ42-ucYETjzj-8" value="$$\text{voteID}_i$$" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;fillColor=#f8cecc;strokeColor=#b85450;fontFamily=Courier New;" vertex="1" parent="bshJnAdmZ42-ucYETjzj-1"> - <mxGeometry x="480" y="-140" width="80" height="40" as="geometry" /> + <mxCell id="ZHVPnpmu-zi4kkNDXHjC-8" value="$$\text{voteID}_i$$" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;fillColor=#f8cecc;strokeColor=#b85450;fontFamily=Courier New;" vertex="1" parent="ZHVPnpmu-zi4kkNDXHjC-1"> + <mxGeometry x="480" y="-190" width="80" height="40" as="geometry" /> </mxCell> - <mxCell id="bshJnAdmZ42-ucYETjzj-9" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="bshJnAdmZ42-ucYETjzj-1" source="bshJnAdmZ42-ucYETjzj-10" target="bshJnAdmZ42-ucYETjzj-30"> + <mxCell id="ZHVPnpmu-zi4kkNDXHjC-9" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="ZHVPnpmu-zi4kkNDXHjC-1" source="ZHVPnpmu-zi4kkNDXHjC-10" target="ZHVPnpmu-zi4kkNDXHjC-30"> <mxGeometry relative="1" as="geometry"> - <mxPoint x="640" y="20" as="targetPoint" /> + <mxPoint x="640" y="-30" as="targetPoint" /> </mxGeometry> </mxCell> - <mxCell id="bshJnAdmZ42-ucYETjzj-10" value="$$pk_i$$" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;fillColor=#f8cecc;strokeColor=#b85450;fontFamily=Courier New;" vertex="1" parent="bshJnAdmZ42-ucYETjzj-1"> - <mxGeometry x="600" y="-90" width="80" height="40" as="geometry" /> + <mxCell id="ZHVPnpmu-zi4kkNDXHjC-10" value="$$pk_i$$" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;fillColor=#f8cecc;strokeColor=#b85450;fontFamily=Courier New;" vertex="1" parent="ZHVPnpmu-zi4kkNDXHjC-1"> + <mxGeometry x="600" y="-140" width="80" height="40" as="geometry" /> </mxCell> - <mxCell id="bshJnAdmZ42-ucYETjzj-11" value="$$\text{stateRoot}^{\text{old}}$$" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;fillColor=#d5e8d4;strokeColor=#82b366;fontFamily=Courier New;" vertex="1" parent="bshJnAdmZ42-ucYETjzj-1"> - <mxGeometry x="1160" y="-70" width="80" height="40" as="geometry" /> + <mxCell id="ZHVPnpmu-zi4kkNDXHjC-11" value="$$\text{stateRoot}^{\text{old}}$$" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;fillColor=#d5e8d4;strokeColor=#82b366;fontFamily=Courier New;" vertex="1" parent="ZHVPnpmu-zi4kkNDXHjC-1"> + <mxGeometry x="1160" y="-120" width="80" height="40" as="geometry" /> </mxCell> - <mxCell id="bshJnAdmZ42-ucYETjzj-12" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;" edge="1" parent="bshJnAdmZ42-ucYETjzj-1" target="bshJnAdmZ42-ucYETjzj-65"> + <mxCell id="ZHVPnpmu-zi4kkNDXHjC-12" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;" edge="1" parent="ZHVPnpmu-zi4kkNDXHjC-1" target="ZHVPnpmu-zi4kkNDXHjC-65"> <mxGeometry relative="1" as="geometry"> <mxPoint x="779.67" y="230" as="sourcePoint" /> <mxPoint x="779.67" y="620" as="targetPoint" /> </mxGeometry> </mxCell> - <mxCell id="bshJnAdmZ42-ucYETjzj-13" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.75;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="bshJnAdmZ42-ucYETjzj-1" source="bshJnAdmZ42-ucYETjzj-66" target="bshJnAdmZ42-ucYETjzj-79"> + <mxCell id="ZHVPnpmu-zi4kkNDXHjC-13" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.75;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="ZHVPnpmu-zi4kkNDXHjC-1" source="ZHVPnpmu-zi4kkNDXHjC-66" target="ZHVPnpmu-zi4kkNDXHjC-79"> <mxGeometry relative="1" as="geometry" /> </mxCell> - <mxCell id="bshJnAdmZ42-ucYETjzj-14" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;" edge="1" parent="bshJnAdmZ42-ucYETjzj-1"> + <mxCell id="ZHVPnpmu-zi4kkNDXHjC-14" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;" edge="1" parent="ZHVPnpmu-zi4kkNDXHjC-1"> <mxGeometry relative="1" as="geometry"> - <mxPoint x="505" y="1200" as="sourcePoint" /> - <mxPoint x="505" y="1200" as="targetPoint" /> + <mxPoint x="505" y="1220" as="sourcePoint" /> + <mxPoint x="505" y="1220" as="targetPoint" /> </mxGeometry> </mxCell> - <mxCell id="bshJnAdmZ42-ucYETjzj-15" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0;exitY=0.5;exitDx=0;exitDy=0;entryX=1;entryY=0.513;entryDx=0;entryDy=0;entryPerimeter=0;" edge="1" parent="bshJnAdmZ42-ucYETjzj-1" source="bshJnAdmZ42-ucYETjzj-20" target="bshJnAdmZ42-ucYETjzj-6"> + <mxCell id="ZHVPnpmu-zi4kkNDXHjC-15" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0;exitY=0.5;exitDx=0;exitDy=0;entryX=1;entryY=0.513;entryDx=0;entryDy=0;entryPerimeter=0;" edge="1" parent="ZHVPnpmu-zi4kkNDXHjC-1" source="ZHVPnpmu-zi4kkNDXHjC-20" target="ZHVPnpmu-zi4kkNDXHjC-6"> <mxGeometry relative="1" as="geometry"> <mxPoint x="1280" y="405" as="targetPoint" /> <Array as="points"> <mxPoint x="1390" y="830" /> - <mxPoint x="1390" y="451" /> + <mxPoint x="1390" y="405" /> </Array> </mxGeometry> </mxCell> - <mxCell id="bshJnAdmZ42-ucYETjzj-16" value="$$\text{stateRoot}^{\text{new}}$$" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;fillColor=#f8cecc;strokeColor=#b85450;fontFamily=Courier New;" vertex="1" parent="bshJnAdmZ42-ucYETjzj-1"> + <mxCell id="ZHVPnpmu-zi4kkNDXHjC-16" value="$$\text{stateRoot}^{\text{new}}$$" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;fillColor=#f8cecc;strokeColor=#b85450;fontFamily=Courier New;" vertex="1" parent="ZHVPnpmu-zi4kkNDXHjC-1"> <mxGeometry x="1040" y="810" width="80" height="40" as="geometry" /> </mxCell> - <mxCell id="bshJnAdmZ42-ucYETjzj-17" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="bshJnAdmZ42-ucYETjzj-1" source="bshJnAdmZ42-ucYETjzj-18"> + <mxCell id="ZHVPnpmu-zi4kkNDXHjC-17" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="ZHVPnpmu-zi4kkNDXHjC-1" source="ZHVPnpmu-zi4kkNDXHjC-18"> <mxGeometry relative="1" as="geometry"> <mxPoint x="680" y="960" as="targetPoint" /> </mxGeometry> </mxCell> - <mxCell id="bshJnAdmZ42-ucYETjzj-18" value="<div><div>$$\text{numVotes}^{\text{new}}$$</div></div>" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;fillColor=#f8cecc;strokeColor=#b85450;fontFamily=Courier New;" vertex="1" parent="bshJnAdmZ42-ucYETjzj-1"> + <mxCell id="ZHVPnpmu-zi4kkNDXHjC-18" value="<div><div>$$\text{numVotes}^{\text{new}}$$</div></div>" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;fillColor=#f8cecc;strokeColor=#b85450;fontFamily=Courier New;" vertex="1" parent="ZHVPnpmu-zi4kkNDXHjC-1"> <mxGeometry x="620" y="810" width="120" height="40" as="geometry" /> </mxCell> - <mxCell id="bshJnAdmZ42-ucYETjzj-19" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="bshJnAdmZ42-ucYETjzj-1" source="bshJnAdmZ42-ucYETjzj-20"> + <mxCell id="ZHVPnpmu-zi4kkNDXHjC-19" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="ZHVPnpmu-zi4kkNDXHjC-1" source="ZHVPnpmu-zi4kkNDXHjC-20"> <mxGeometry relative="1" as="geometry"> <mxPoint x="540" y="960" as="targetPoint" /> </mxGeometry> </mxCell> - <mxCell id="bshJnAdmZ42-ucYETjzj-20" value="<div><div>$$\text{numOverwrites}^{\text{new}}$$</div></div>" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;fillColor=#f8cecc;strokeColor=#b85450;fontFamily=Courier New;" vertex="1" parent="bshJnAdmZ42-ucYETjzj-1"> + <mxCell id="ZHVPnpmu-zi4kkNDXHjC-20" value="<div><div>$$\text{numOverwrites}^{\text{new}}$$</div></div>" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;fillColor=#f8cecc;strokeColor=#b85450;fontFamily=Courier New;" vertex="1" parent="ZHVPnpmu-zi4kkNDXHjC-1"> <mxGeometry x="480" y="810" width="120" height="40" as="geometry" /> </mxCell> - <mxCell id="bshJnAdmZ42-ucYETjzj-21" value="<div><div>$$\text{resultsAdd}^{\text{new}}$$</div></div>" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;fillColor=#f8cecc;strokeColor=#b85450;fontFamily=Courier New;" vertex="1" parent="bshJnAdmZ42-ucYETjzj-1"> + <mxCell id="ZHVPnpmu-zi4kkNDXHjC-21" value="<div><div>$$\text{resultsAdd}^{\text{new}}$$</div></div>" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;fillColor=#f8cecc;strokeColor=#b85450;fontFamily=Courier New;" vertex="1" parent="ZHVPnpmu-zi4kkNDXHjC-1"> <mxGeometry x="900" y="810" width="120" height="40" as="geometry" /> </mxCell> - <mxCell id="bshJnAdmZ42-ucYETjzj-22" value="<div><div>$$\text{resultsSub}^{\text{new}}$$</div></div>" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;fillColor=#f8cecc;strokeColor=#b85450;fontFamily=Courier New;" vertex="1" parent="bshJnAdmZ42-ucYETjzj-1"> + <mxCell id="ZHVPnpmu-zi4kkNDXHjC-22" value="<div><div>$$\text{resultsSub}^{\text{new}}$$</div></div>" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;fillColor=#f8cecc;strokeColor=#b85450;fontFamily=Courier New;" vertex="1" parent="ZHVPnpmu-zi4kkNDXHjC-1"> <mxGeometry x="760" y="810" width="120" height="40" as="geometry" /> </mxCell> - <mxCell id="bshJnAdmZ42-ucYETjzj-23" value="$$\text{stateRoot}^{\text{new}}$$" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;fillColor=#d5e8d4;strokeColor=#82b366;fontFamily=Courier New;" vertex="1" parent="bshJnAdmZ42-ucYETjzj-1"> + <mxCell id="ZHVPnpmu-zi4kkNDXHjC-23" value="$$\text{stateRoot}^{\text{new}}$$" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;fillColor=#d5e8d4;strokeColor=#82b366;fontFamily=Courier New;" vertex="1" parent="ZHVPnpmu-zi4kkNDXHjC-1"> <mxGeometry x="1040" y="960" width="80" height="40" as="geometry" /> </mxCell> - <mxCell id="bshJnAdmZ42-ucYETjzj-24" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.25;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="bshJnAdmZ42-ucYETjzj-1" source="bshJnAdmZ42-ucYETjzj-25" target="bshJnAdmZ42-ucYETjzj-26"> + <mxCell id="ZHVPnpmu-zi4kkNDXHjC-24" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.25;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="ZHVPnpmu-zi4kkNDXHjC-1" source="ZHVPnpmu-zi4kkNDXHjC-25" target="ZHVPnpmu-zi4kkNDXHjC-26"> <mxGeometry relative="1" as="geometry"> <mxPoint x="-145" y="-10" as="targetPoint" /> </mxGeometry> </mxCell> - <mxCell id="bshJnAdmZ42-ucYETjzj-25" value="<div style="font-size: 11px;">$$\text{aggregationProof}_i$$</div>" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;fillColor=#f8cecc;strokeColor=#b85450;fontFamily=Courier New;" vertex="1" parent="bshJnAdmZ42-ucYETjzj-1"> - <mxGeometry x="-165" y="-70" width="130" height="40" as="geometry" /> + <mxCell id="ZHVPnpmu-zi4kkNDXHjC-25" value="<div style="font-size: 11px;">$$\text{aggregationProof}_i$$</div>" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;fillColor=#f8cecc;strokeColor=#b85450;fontFamily=Courier New;" vertex="1" parent="ZHVPnpmu-zi4kkNDXHjC-1"> + <mxGeometry x="-165" y="-120" width="130" height="40" as="geometry" /> </mxCell> - <mxCell id="bshJnAdmZ42-ucYETjzj-26" value="recursive SNARK batch verifier" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;fillColor=#fff2cc;strokeColor=#d6b656;fontFamily=Courier New;" vertex="1" parent="bshJnAdmZ42-ucYETjzj-1"> - <mxGeometry x="-210" y="130" width="440" height="220" as="geometry" /> + <mxCell id="ZHVPnpmu-zi4kkNDXHjC-26" value="recursive SNARK batch verifier" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;fillColor=#fff2cc;strokeColor=#d6b656;fontFamily=Courier New;" vertex="1" parent="ZHVPnpmu-zi4kkNDXHjC-1"> + <mxGeometry x="-210" y="80" width="440" height="220" as="geometry" /> </mxCell> - <mxCell id="bshJnAdmZ42-ucYETjzj-27" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="bshJnAdmZ42-ucYETjzj-1" source="bshJnAdmZ42-ucYETjzj-8"> + <mxCell id="ZHVPnpmu-zi4kkNDXHjC-27" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="ZHVPnpmu-zi4kkNDXHjC-1" source="ZHVPnpmu-zi4kkNDXHjC-8"> <mxGeometry relative="1" as="geometry"> - <mxPoint x="520.09" y="-10" as="sourcePoint" /> - <mxPoint x="520" y="130" as="targetPoint" /> + <mxPoint x="520.09" y="-60" as="sourcePoint" /> + <mxPoint x="520" y="80" as="targetPoint" /> <Array as="points" /> </mxGeometry> </mxCell> - <mxCell id="bshJnAdmZ42-ucYETjzj-28" value="" style="endArrow=classic;html=1;rounded=0;entryX=0.75;entryY=0;entryDx=0;entryDy=0;startArrow=oval;startFill=1;jumpStyle=arc;" edge="1" parent="bshJnAdmZ42-ucYETjzj-1" target="bshJnAdmZ42-ucYETjzj-26"> + <mxCell id="ZHVPnpmu-zi4kkNDXHjC-28" value="" style="endArrow=classic;html=1;rounded=0;entryX=0.75;entryY=0;entryDx=0;entryDy=0;startArrow=oval;startFill=1;jumpStyle=arc;" edge="1" parent="ZHVPnpmu-zi4kkNDXHjC-1" target="ZHVPnpmu-zi4kkNDXHjC-26"> <mxGeometry width="50" height="50" relative="1" as="geometry"> <mxPoint x="320" y="-120" as="sourcePoint" /> <mxPoint x="570" y="-110" as="targetPoint" />@@ -1075,149 +1075,146 @@ <mxPoint x="120" />
</Array> </mxGeometry> </mxCell> - <mxCell id="bshJnAdmZ42-ucYETjzj-29" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.318;entryY=0.003;entryDx=0;entryDy=0;entryPerimeter=0;" edge="1" parent="bshJnAdmZ42-ucYETjzj-1" source="kXBYuY-UTKVdfyJdre-C-0" target="bshJnAdmZ42-ucYETjzj-63"> + <mxCell id="ZHVPnpmu-zi4kkNDXHjC-29" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;" edge="1" parent="ZHVPnpmu-zi4kkNDXHjC-1" source="ZHVPnpmu-zi4kkNDXHjC-30"> <mxGeometry relative="1" as="geometry"> <mxPoint x="640.0222222222224" y="29.88000000000011" as="sourcePoint" /> <mxPoint x="640" y="80" as="targetPoint" /> - <Array as="points"> - <mxPoint x="640" y="40" /> - <mxPoint x="640" y="40" /> - </Array> + <Array as="points" /> </mxGeometry> </mxCell> - <mxCell id="bshJnAdmZ42-ucYETjzj-30" value="$$\text{Hash}(pk_i)$$" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;fillColor=#dae8fc;strokeColor=#6c8ebf;fontFamily=Courier New;" vertex="1" parent="bshJnAdmZ42-ucYETjzj-1"> - <mxGeometry x="600" y="10" width="80" height="40" as="geometry" /> + <mxCell id="ZHVPnpmu-zi4kkNDXHjC-30" value="$$\text{Hash}(pk_i)$$" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;fillColor=#dae8fc;strokeColor=#6c8ebf;fontFamily=Courier New;" vertex="1" parent="ZHVPnpmu-zi4kkNDXHjC-1"> + <mxGeometry x="600" y="-40" width="80" height="40" as="geometry" /> </mxCell> - <mxCell id="bshJnAdmZ42-ucYETjzj-31" value="$$\text{address}_i$$" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;fillColor=default;strokeColor=none;fontFamily=Courier New;" vertex="1" parent="bshJnAdmZ42-ucYETjzj-1"> - <mxGeometry x="1090" y="270" width="60" height="39.88" as="geometry" /> + <mxCell id="ZHVPnpmu-zi4kkNDXHjC-31" value="$$\text{address}_i$$" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;fillColor=default;strokeColor=none;fontFamily=Courier New;" vertex="1" parent="ZHVPnpmu-zi4kkNDXHjC-1"> + <mxGeometry x="610" y="20" width="60" height="39.88" as="geometry" /> </mxCell> - <mxCell id="bshJnAdmZ42-ucYETjzj-32" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="bshJnAdmZ42-ucYETjzj-1" source="bshJnAdmZ42-ucYETjzj-45"> + <mxCell id="ZHVPnpmu-zi4kkNDXHjC-32" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="ZHVPnpmu-zi4kkNDXHjC-1" source="ZHVPnpmu-zi4kkNDXHjC-45"> <mxGeometry relative="1" as="geometry"> - <mxPoint x="898.95" y="-30" as="sourcePoint" /> - <mxPoint x="900" y="130" as="targetPoint" /> + <mxPoint x="898.95" y="-80" as="sourcePoint" /> + <mxPoint x="900" y="80" as="targetPoint" /> <Array as="points" /> </mxGeometry> </mxCell> - <mxCell id="bshJnAdmZ42-ucYETjzj-33" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;" edge="1" parent="bshJnAdmZ42-ucYETjzj-1" source="bshJnAdmZ42-ucYETjzj-46"> + <mxCell id="ZHVPnpmu-zi4kkNDXHjC-33" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;" edge="1" parent="ZHVPnpmu-zi4kkNDXHjC-1" source="ZHVPnpmu-zi4kkNDXHjC-46"> <mxGeometry relative="1" as="geometry"> - <mxPoint x="1059.47" y="-30" as="sourcePoint" /> - <mxPoint x="1060" y="130" as="targetPoint" /> + <mxPoint x="1059.47" y="-80" as="sourcePoint" /> + <mxPoint x="1060" y="80" as="targetPoint" /> <Array as="points" /> </mxGeometry> </mxCell> - <mxCell id="bshJnAdmZ42-ucYETjzj-34" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;" edge="1" parent="bshJnAdmZ42-ucYETjzj-1"> + <mxCell id="ZHVPnpmu-zi4kkNDXHjC-34" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;" edge="1" parent="ZHVPnpmu-zi4kkNDXHjC-1"> <mxGeometry relative="1" as="geometry"> - <mxPoint x="1199.47" y="-30" as="sourcePoint" /> - <mxPoint x="1199" y="130" as="targetPoint" /> + <mxPoint x="1199.47" y="-80" as="sourcePoint" /> + <mxPoint x="1199" y="80" as="targetPoint" /> <Array as="points" /> </mxGeometry> </mxCell> - <mxCell id="bshJnAdmZ42-ucYETjzj-35" value="public inputs" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;fontFamily=Courier New;strokeColor=none;" vertex="1" parent="bshJnAdmZ42-ucYETjzj-1"> + <mxCell id="ZHVPnpmu-zi4kkNDXHjC-35" value="public inputs" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;fontFamily=Courier New;strokeColor=none;" vertex="1" parent="ZHVPnpmu-zi4kkNDXHjC-1"> <mxGeometry x="160" y="-140" width="120" height="40" as="geometry" /> </mxCell> - <mxCell id="bshJnAdmZ42-ucYETjzj-36" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;" edge="1" parent="bshJnAdmZ42-ucYETjzj-1" source="bshJnAdmZ42-ucYETjzj-26" target="bshJnAdmZ42-ucYETjzj-37"> + <mxCell id="ZHVPnpmu-zi4kkNDXHjC-36" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;" edge="1" parent="ZHVPnpmu-zi4kkNDXHjC-1" source="ZHVPnpmu-zi4kkNDXHjC-26" target="ZHVPnpmu-zi4kkNDXHjC-37"> <mxGeometry relative="1" as="geometry"> <mxPoint y="310" as="targetPoint" /> <mxPoint y="240" as="sourcePoint" /> </mxGeometry> </mxCell> - <mxCell id="bshJnAdmZ42-ucYETjzj-37" value="true" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;fontFamily=Courier New;strokeColor=none;" vertex="1" parent="bshJnAdmZ42-ucYETjzj-1"> + <mxCell id="ZHVPnpmu-zi4kkNDXHjC-37" value="true" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;fontFamily=Courier New;strokeColor=none;" vertex="1" parent="ZHVPnpmu-zi4kkNDXHjC-1"> <mxGeometry x="-30" y="960" width="80" height="40" as="geometry" /> </mxCell> - <mxCell id="bshJnAdmZ42-ucYETjzj-38" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;" edge="1" parent="bshJnAdmZ42-ucYETjzj-1" source="bshJnAdmZ42-ucYETjzj-39"> + <mxCell id="ZHVPnpmu-zi4kkNDXHjC-38" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;" edge="1" parent="ZHVPnpmu-zi4kkNDXHjC-1" source="ZHVPnpmu-zi4kkNDXHjC-39"> <mxGeometry relative="1" as="geometry"> - <mxPoint x="400" y="-30" as="sourcePoint" /> - <mxPoint x="400" y="130" as="targetPoint" /> + <mxPoint x="400" y="-80" as="sourcePoint" /> + <mxPoint x="400" y="80" as="targetPoint" /> <Array as="points" /> </mxGeometry> </mxCell> - <mxCell id="bshJnAdmZ42-ucYETjzj-39" value="$$\text{censusRoot}$$" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;fillColor=#f8cecc;strokeColor=#b85450;fontFamily=Courier New;" vertex="1" parent="bshJnAdmZ42-ucYETjzj-1"> + <mxCell id="ZHVPnpmu-zi4kkNDXHjC-39" value="$$\text{censusRoot}$$" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;fillColor=#f8cecc;strokeColor=#b85450;fontFamily=Courier New;" vertex="1" parent="ZHVPnpmu-zi4kkNDXHjC-1"> + <mxGeometry x="360" y="-290" width="80" height="40" as="geometry" /> + </mxCell> + <mxCell id="ZHVPnpmu-zi4kkNDXHjC-40" value="<div>$$\text{ballotMode}$$</div>" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;fillColor=#f8cecc;strokeColor=#b85450;fontFamily=Courier New;" vertex="1" parent="ZHVPnpmu-zi4kkNDXHjC-1"> <mxGeometry x="360" y="-240" width="80" height="40" as="geometry" /> </mxCell> - <mxCell id="bshJnAdmZ42-ucYETjzj-40" value="<div>$$\text{ballotMode}$$</div>" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;fillColor=#f8cecc;strokeColor=#b85450;fontFamily=Courier New;" vertex="1" parent="bshJnAdmZ42-ucYETjzj-1"> + <mxCell id="ZHVPnpmu-zi4kkNDXHjC-41" value="$$EPK$$" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;fillColor=#f8cecc;strokeColor=#b85450;fontFamily=Courier New;" vertex="1" parent="ZHVPnpmu-zi4kkNDXHjC-1"> <mxGeometry x="360" y="-190" width="80" height="40" as="geometry" /> </mxCell> - <mxCell id="bshJnAdmZ42-ucYETjzj-41" value="$$EPK$$" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;fillColor=#f8cecc;strokeColor=#b85450;fontFamily=Courier New;" vertex="1" parent="bshJnAdmZ42-ucYETjzj-1"> + <mxCell id="ZHVPnpmu-zi4kkNDXHjC-42" value="<div>$$\text{processID}$$</div>" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;fillColor=#f8cecc;strokeColor=#b85450;fontFamily=Courier New;" vertex="1" parent="ZHVPnpmu-zi4kkNDXHjC-1"> <mxGeometry x="360" y="-140" width="80" height="40" as="geometry" /> </mxCell> - <mxCell id="bshJnAdmZ42-ucYETjzj-42" value="<div>$$\text{processID}$$</div>" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;fillColor=#f8cecc;strokeColor=#b85450;fontFamily=Courier New;" vertex="1" parent="bshJnAdmZ42-ucYETjzj-1"> - <mxGeometry x="360" y="-90" width="80" height="40" as="geometry" /> + <mxCell id="ZHVPnpmu-zi4kkNDXHjC-43" value="$$(C_1, C_2)_i$$" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;fillColor=#f8cecc;strokeColor=#b85450;fontFamily=Courier New;" vertex="1" parent="ZHVPnpmu-zi4kkNDXHjC-1"> + <mxGeometry x="480" y="-140" width="80" height="40" as="geometry" /> </mxCell> - <mxCell id="bshJnAdmZ42-ucYETjzj-43" value="$$(C_1, C_2)_i$$" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;fillColor=#f8cecc;strokeColor=#b85450;fontFamily=Courier New;" vertex="1" parent="bshJnAdmZ42-ucYETjzj-1"> - <mxGeometry x="480" y="-90" width="80" height="40" as="geometry" /> + <mxCell id="ZHVPnpmu-zi4kkNDXHjC-44" value="<div>$$\text{numVotes}^{\text{old}}$$</div>" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;fillColor=#d5e8d4;strokeColor=#82b366;fontFamily=Courier New;" vertex="1" parent="ZHVPnpmu-zi4kkNDXHjC-1"> + <mxGeometry x="840" y="-120" width="120" height="40" as="geometry" /> </mxCell> - <mxCell id="bshJnAdmZ42-ucYETjzj-44" value="<div>$$\text{numVotes}^{\text{old}}$$</div>" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;fillColor=#d5e8d4;strokeColor=#82b366;fontFamily=Courier New;" vertex="1" parent="bshJnAdmZ42-ucYETjzj-1"> - <mxGeometry x="840" y="-70" width="120" height="40" as="geometry" /> + <mxCell id="ZHVPnpmu-zi4kkNDXHjC-45" value="<div>$$\text{numOverwrites}^{\text{old}}$$</div>" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;fillColor=#d5e8d4;strokeColor=#82b366;fontFamily=Courier New;" vertex="1" parent="ZHVPnpmu-zi4kkNDXHjC-1"> + <mxGeometry x="840" y="-170" width="120" height="40" as="geometry" /> </mxCell> - <mxCell id="bshJnAdmZ42-ucYETjzj-45" value="<div>$$\text{numOverwrites}^{\text{old}}$$</div>" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;fillColor=#d5e8d4;strokeColor=#82b366;fontFamily=Courier New;" vertex="1" parent="bshJnAdmZ42-ucYETjzj-1"> - <mxGeometry x="840" y="-120" width="120" height="40" as="geometry" /> + <mxCell id="ZHVPnpmu-zi4kkNDXHjC-46" value="<div>$$\text{resultsAdd}^{\text{old}}$$</div>" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;fillColor=#f8cecc;strokeColor=#b85450;fontFamily=Courier New;" vertex="1" parent="ZHVPnpmu-zi4kkNDXHjC-1"> + <mxGeometry x="1000" y="-170" width="120" height="40" as="geometry" /> </mxCell> - <mxCell id="bshJnAdmZ42-ucYETjzj-46" value="<div>$$\text{resultsAdd}^{\text{old}}$$</div>" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;fillColor=#f8cecc;strokeColor=#b85450;fontFamily=Courier New;" vertex="1" parent="bshJnAdmZ42-ucYETjzj-1"> + <mxCell id="ZHVPnpmu-zi4kkNDXHjC-47" value="<div>$$\text{resultsSub}^{\text{old}}$$</div>" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;fillColor=#f8cecc;strokeColor=#b85450;fontFamily=Courier New;" vertex="1" parent="ZHVPnpmu-zi4kkNDXHjC-1"> <mxGeometry x="1000" y="-120" width="120" height="40" as="geometry" /> </mxCell> - <mxCell id="bshJnAdmZ42-ucYETjzj-47" value="<div>$$\text{resultsSub}^{\text{old}}$$</div>" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;fillColor=#f8cecc;strokeColor=#b85450;fontFamily=Courier New;" vertex="1" parent="bshJnAdmZ42-ucYETjzj-1"> - <mxGeometry x="1000" y="-70" width="120" height="40" as="geometry" /> - </mxCell> - <mxCell id="bshJnAdmZ42-ucYETjzj-48" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.25;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="bshJnAdmZ42-ucYETjzj-1" source="bshJnAdmZ42-ucYETjzj-67" target="bshJnAdmZ42-ucYETjzj-79"> + <mxCell id="ZHVPnpmu-zi4kkNDXHjC-48" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.25;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="ZHVPnpmu-zi4kkNDXHjC-1" source="ZHVPnpmu-zi4kkNDXHjC-67" target="ZHVPnpmu-zi4kkNDXHjC-79"> <mxGeometry relative="1" as="geometry" /> </mxCell> - <mxCell id="bshJnAdmZ42-ucYETjzj-49" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;jumpStyle=arc;" edge="1" parent="bshJnAdmZ42-ucYETjzj-1" source="bshJnAdmZ42-ucYETjzj-50" target="bshJnAdmZ42-ucYETjzj-52"> + <mxCell id="ZHVPnpmu-zi4kkNDXHjC-49" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;jumpStyle=arc;" edge="1" parent="ZHVPnpmu-zi4kkNDXHjC-1" source="ZHVPnpmu-zi4kkNDXHjC-50" target="ZHVPnpmu-zi4kkNDXHjC-52"> <mxGeometry relative="1" as="geometry"> <mxPoint x="320" y="730" as="targetPoint" /> </mxGeometry> </mxCell> - <mxCell id="bshJnAdmZ42-ucYETjzj-50" value="$$k$$" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;fillColor=#f8cecc;strokeColor=#b85450;fontFamily=Courier New;" vertex="1" parent="bshJnAdmZ42-ucYETjzj-1"> + <mxCell id="ZHVPnpmu-zi4kkNDXHjC-50" value="$$k$$" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;fillColor=#f8cecc;strokeColor=#b85450;fontFamily=Courier New;" vertex="1" parent="ZHVPnpmu-zi4kkNDXHjC-1"> <mxGeometry x="-350" y="490" width="60" height="40" as="geometry" /> </mxCell> - <mxCell id="bshJnAdmZ42-ucYETjzj-51" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;" edge="1" parent="bshJnAdmZ42-ucYETjzj-1" source="bshJnAdmZ42-ucYETjzj-52" target="bshJnAdmZ42-ucYETjzj-79"> + <mxCell id="ZHVPnpmu-zi4kkNDXHjC-51" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;" edge="1" parent="ZHVPnpmu-zi4kkNDXHjC-1" source="ZHVPnpmu-zi4kkNDXHjC-52" target="ZHVPnpmu-zi4kkNDXHjC-79"> <mxGeometry relative="1" as="geometry"> <mxPoint x="440" y="730" as="sourcePoint" /> </mxGeometry> </mxCell> - <mxCell id="bshJnAdmZ42-ucYETjzj-52" value="$$\text{Hash}(k)$$" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;fillColor=#f8cecc;strokeColor=#b85450;fontFamily=Courier New;" vertex="1" parent="bshJnAdmZ42-ucYETjzj-1"> + <mxCell id="ZHVPnpmu-zi4kkNDXHjC-52" value="$$\text{Hash}(k)$$" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;fillColor=#f8cecc;strokeColor=#b85450;fontFamily=Courier New;" vertex="1" parent="ZHVPnpmu-zi4kkNDXHjC-1"> <mxGeometry x="360" y="490" width="80" height="40" as="geometry" /> </mxCell> - <mxCell id="bshJnAdmZ42-ucYETjzj-53" value="" style="text;whiteSpace=wrap;html=1;" vertex="1" parent="bshJnAdmZ42-ucYETjzj-1"> + <mxCell id="ZHVPnpmu-zi4kkNDXHjC-53" value="" style="text;whiteSpace=wrap;html=1;" vertex="1" parent="ZHVPnpmu-zi4kkNDXHjC-1"> <mxGeometry x="880" y="1020" width="60" height="50" as="geometry" /> </mxCell> - <mxCell id="bshJnAdmZ42-ucYETjzj-54" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;exitX=0.173;exitY=0.992;exitDx=0;exitDy=0;exitPerimeter=0;" edge="1" parent="bshJnAdmZ42-ucYETjzj-1" source="bshJnAdmZ42-ucYETjzj-63" target="bshJnAdmZ42-ucYETjzj-67"> + <mxCell id="ZHVPnpmu-zi4kkNDXHjC-54" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;exitX=0.173;exitY=0.992;exitDx=0;exitDy=0;exitPerimeter=0;" edge="1" parent="ZHVPnpmu-zi4kkNDXHjC-1" source="ZHVPnpmu-zi4kkNDXHjC-63" target="ZHVPnpmu-zi4kkNDXHjC-67"> <mxGeometry relative="1" as="geometry"> <mxPoint x="512" y="320" as="sourcePoint" /> <mxPoint x="560" y="580" as="targetPoint" /> <Array as="points" /> </mxGeometry> </mxCell> - <mxCell id="bshJnAdmZ42-ucYETjzj-55" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;" edge="1" parent="bshJnAdmZ42-ucYETjzj-1" target="bshJnAdmZ42-ucYETjzj-66"> + <mxCell id="ZHVPnpmu-zi4kkNDXHjC-55" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;" edge="1" parent="ZHVPnpmu-zi4kkNDXHjC-1" target="ZHVPnpmu-zi4kkNDXHjC-66"> <mxGeometry relative="1" as="geometry"> <mxPoint x="596.5" y="300" as="sourcePoint" /> <mxPoint x="596.5" y="550" as="targetPoint" /> </mxGeometry> </mxCell> - <mxCell id="bshJnAdmZ42-ucYETjzj-56" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="bshJnAdmZ42-ucYETjzj-1" target="bshJnAdmZ42-ucYETjzj-64"> + <mxCell id="ZHVPnpmu-zi4kkNDXHjC-56" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="ZHVPnpmu-zi4kkNDXHjC-1" target="ZHVPnpmu-zi4kkNDXHjC-64"> <mxGeometry relative="1" as="geometry"> <mxPoint x="870" y="300" as="sourcePoint" /> <mxPoint x="870" y="550" as="targetPoint" /> </mxGeometry> </mxCell> - <mxCell id="bshJnAdmZ42-ucYETjzj-57" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="bshJnAdmZ42-ucYETjzj-1" target="bshJnAdmZ42-ucYETjzj-72"> + <mxCell id="ZHVPnpmu-zi4kkNDXHjC-57" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="ZHVPnpmu-zi4kkNDXHjC-1" target="ZHVPnpmu-zi4kkNDXHjC-72"> <mxGeometry relative="1" as="geometry"> <mxPoint x="979.5" y="250" as="sourcePoint" /> <mxPoint x="979.5" y="500" as="targetPoint" /> </mxGeometry> </mxCell> - <mxCell id="bshJnAdmZ42-ucYETjzj-58" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="bshJnAdmZ42-ucYETjzj-1" target="bshJnAdmZ42-ucYETjzj-73"> + <mxCell id="ZHVPnpmu-zi4kkNDXHjC-58" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="ZHVPnpmu-zi4kkNDXHjC-1" target="ZHVPnpmu-zi4kkNDXHjC-73"> <mxGeometry relative="1" as="geometry"> <mxPoint x="1109" y="250" as="sourcePoint" /> <mxPoint x="1109" y="500" as="targetPoint" /> </mxGeometry> </mxCell> - <mxCell id="bshJnAdmZ42-ucYETjzj-59" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;" edge="1" parent="bshJnAdmZ42-ucYETjzj-1" target="bshJnAdmZ42-ucYETjzj-74"> + <mxCell id="ZHVPnpmu-zi4kkNDXHjC-59" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;" edge="1" parent="ZHVPnpmu-zi4kkNDXHjC-1" target="ZHVPnpmu-zi4kkNDXHjC-74"> <mxGeometry relative="1" as="geometry"> <mxPoint x="1219.5" y="300" as="sourcePoint" /> <mxPoint x="1219.5" y="550" as="targetPoint" /> </mxGeometry> </mxCell> - <mxCell id="bshJnAdmZ42-ucYETjzj-60" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;" edge="1" parent="bshJnAdmZ42-ucYETjzj-1"> + <mxCell id="ZHVPnpmu-zi4kkNDXHjC-60" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;" edge="1" parent="ZHVPnpmu-zi4kkNDXHjC-1"> <mxGeometry relative="1" as="geometry"> <mxPoint x="779.29" y="440" as="sourcePoint" /> <mxPoint x="779" y="610" as="targetPoint" />@@ -1227,31 +1224,31 @@ <mxPoint x="779" y="520" />
</Array> </mxGeometry> </mxCell> - <mxCell id="bshJnAdmZ42-ucYETjzj-61" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;" edge="1" parent="bshJnAdmZ42-ucYETjzj-1" source="bshJnAdmZ42-ucYETjzj-75"> + <mxCell id="ZHVPnpmu-zi4kkNDXHjC-61" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;" edge="1" parent="ZHVPnpmu-zi4kkNDXHjC-1"> <mxGeometry relative="1" as="geometry"> <mxPoint x="979.41" y="350" as="sourcePoint" /> <mxPoint x="980" y="610" as="targetPoint" /> </mxGeometry> </mxCell> - <mxCell id="bshJnAdmZ42-ucYETjzj-62" value="<div><div><div><div><div><div><div><div><div><div>$$\text{stateRoot}^{\text{old}} = \text{stateRoot}^{\text{new}}$$</div><div><br></div></div></div></div>$$\text{numVotes}^{\text{old}} = \text{numVotes}^{\text{new}}$$</div></div></div>$$\text{numOverwrites}^{\text{old}} = \text{numOverwrites}^{\text{new}}$$</div><div><br></div><div><div><div><div><div><div><div>$$\text{resultsAdd}^{\text{old}} = \text{resultsAdd}^{\text{new}}$$</div></div></div>$$\text{resultsSub}^{\text{old}} = \text{resultsSub}^{\text{new}}$$</div></div></div></div></div></div>" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;fontFamily=Courier New;" vertex="1" parent="bshJnAdmZ42-ucYETjzj-1"> + <mxCell id="ZHVPnpmu-zi4kkNDXHjC-62" value="<div><div><div><div><div><div><div><div><div><div>$$\text{stateRoot}^{\text{old}} = \text{stateRoot}^{\text{new}}$$</div><div><br></div></div></div></div>$$\text{numVotes}^{\text{old}} = \text{numVotes}^{\text{new}}$$</div></div></div>$$\text{numOverwrites}^{\text{old}} = \text{numOverwrites}^{\text{new}}$$</div><div><br></div><div><div><div><div><div><div><div>$$\text{resultsAdd}^{\text{old}} = \text{resultsAdd}^{\text{new}}$$</div></div></div>$$\text{resultsSub}^{\text{old}} = \text{resultsSub}^{\text{new}}$$</div></div></div></div></div></div>" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;fontFamily=Courier New;" vertex="1" parent="ZHVPnpmu-zi4kkNDXHjC-1"> <mxGeometry x="1270" y="490" width="240" height="230" as="geometry" /> </mxCell> - <mxCell id="bshJnAdmZ42-ucYETjzj-63" value="<div><u><b>VERIFY INITIAL STATE</b><b><br><br></b></u></div><div><b><br></b></div><div align="left"><b>1.</b> Verify the MTProofs that prove that the first leafs of the tree store the public parameters of the voting process:<br><br>&nbsp;&nbsp; 0x0 = <b>processID</b>, 0x1 = <b>censusRoot</b>, 0x2 = <b>ballotMode</b>, 0x3 = <b>EPK</b>, 0x4 = <b>resultsAdd^{old}</b>, 0x5 = <b>resultsAdd^{sub}</b>. <br><br></div><div align="left"><b>2.</b> Verify the MTProofs that prove that none of the <b>voteIDs</b> belong to the tree.<br><b><br>3.</b> Verify the MTProofs of each <b>address</b>:<br><br>&nbsp;&nbsp; - If it is an inclusion proof: consider the vote <b>(c1, c2)</b> an <b>overwrite</b>.</div><div align="left">&nbsp;&nbsp; - If it is a non-inclusion proof: consider the vote <b>(c1, c2)</b> a <b>newVote</b>.</div>" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;fillColor=#e1d5e7;strokeColor=#9673a6;fontFamily=Courier New;" vertex="1" parent="bshJnAdmZ42-ucYETjzj-1"> - <mxGeometry x="360" y="130" width="880" height="220" as="geometry" /> + <mxCell id="ZHVPnpmu-zi4kkNDXHjC-63" value="<div><u><b>VERIFY INITIAL STATE</b><b><br><br></b></u></div><div><b><br></b></div><div align="left"><b>1.</b> Verify the MTProofs that prove that the first leafs of the tree store the public parameters of the voting process:<br><br>&nbsp;&nbsp; 0x0 = <b>processID</b>, 0x1 = <b>censusRoot</b>, 0x2 = <b>ballotMode</b>, 0x3 = <b>EPK</b>, 0x4 = <b>resultsAdd^{old}</b>, 0x5 = <b>resultsAdd^{sub}</b>. <br><br></div><div align="left"><b>2.</b> Verify the MTProofs that prove that none of the <b>voteIDs</b> belong to the tree.<br><b><br>3.</b> Verify the MTProofs of each <b>address</b>:<br><br>&nbsp;&nbsp; - If it is an inclusion proof: consider the vote <b>(c1, c2)</b> an <b>overwrite</b>.</div><div align="left">&nbsp;&nbsp; - If it is a non-inclusion proof: consider the vote <b>(c1, c2)</b> a <b>newVote</b>.</div>" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;fillColor=#e1d5e7;strokeColor=#9673a6;fontFamily=Courier New;" vertex="1" parent="ZHVPnpmu-zi4kkNDXHjC-1"> + <mxGeometry x="360" y="80" width="880" height="220" as="geometry" /> </mxCell> - <mxCell id="bshJnAdmZ42-ucYETjzj-64" value="$$\text{address}_i$$" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;fontFamily=Courier New;fillColor=#f8cecc;strokeColor=#b85450;" vertex="1" parent="bshJnAdmZ42-ucYETjzj-1"> + <mxCell id="ZHVPnpmu-zi4kkNDXHjC-64" value="$$\text{address}_i$$" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;fontFamily=Courier New;fillColor=#f8cecc;strokeColor=#b85450;" vertex="1" parent="ZHVPnpmu-zi4kkNDXHjC-1"> <mxGeometry x="830" y="410" width="80" height="40" as="geometry" /> </mxCell> - <mxCell id="bshJnAdmZ42-ucYETjzj-65" value="$$\text{voteID}_i$$" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;fillColor=#f8cecc;strokeColor=#b85450;fontFamily=Courier New;" vertex="1" parent="bshJnAdmZ42-ucYETjzj-1"> + <mxCell id="ZHVPnpmu-zi4kkNDXHjC-65" value="$$\text{voteID}_i$$" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;fillColor=#f8cecc;strokeColor=#b85450;fontFamily=Courier New;" vertex="1" parent="ZHVPnpmu-zi4kkNDXHjC-1"> <mxGeometry x="740" y="410" width="80" height="40" as="geometry" /> </mxCell> - <mxCell id="bshJnAdmZ42-ucYETjzj-66" value="$$(C_1, C_2)_i$$" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;fillColor=#f8cecc;strokeColor=#b85450;fontFamily=Courier New;" vertex="1" parent="bshJnAdmZ42-ucYETjzj-1"> + <mxCell id="ZHVPnpmu-zi4kkNDXHjC-66" value="$$(C_1, C_2)_i$$" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;fillColor=#f8cecc;strokeColor=#b85450;fontFamily=Courier New;" vertex="1" parent="ZHVPnpmu-zi4kkNDXHjC-1"> <mxGeometry x="557" y="410" width="80" height="40" as="geometry" /> </mxCell> - <mxCell id="bshJnAdmZ42-ucYETjzj-67" value="$$EPK$$" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;fillColor=#f8cecc;strokeColor=#b85450;fontFamily=Courier New;" vertex="1" parent="bshJnAdmZ42-ucYETjzj-1"> + <mxCell id="ZHVPnpmu-zi4kkNDXHjC-67" value="$$EPK$$" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;fillColor=#f8cecc;strokeColor=#b85450;fontFamily=Courier New;" vertex="1" parent="ZHVPnpmu-zi4kkNDXHjC-1"> <mxGeometry x="472" y="410" width="80" height="40" as="geometry" /> </mxCell> - <mxCell id="bshJnAdmZ42-ucYETjzj-68" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;" edge="1" parent="bshJnAdmZ42-ucYETjzj-1"> + <mxCell id="ZHVPnpmu-zi4kkNDXHjC-68" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;" edge="1" parent="ZHVPnpmu-zi4kkNDXHjC-1"> <mxGeometry relative="1" as="geometry"> <mxPoint x="869.9499999999999" y="450" as="sourcePoint" /> <mxPoint x="870" y="610" as="targetPoint" />@@ -1261,7 +1258,7 @@ <mxPoint x="869.66" y="530" />
</Array> </mxGeometry> </mxCell> - <mxCell id="bshJnAdmZ42-ucYETjzj-69" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="bshJnAdmZ42-ucYETjzj-1" source="bshJnAdmZ42-ucYETjzj-78"> + <mxCell id="ZHVPnpmu-zi4kkNDXHjC-69" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="ZHVPnpmu-zi4kkNDXHjC-1" source="ZHVPnpmu-zi4kkNDXHjC-78"> <mxGeometry relative="1" as="geometry"> <mxPoint x="550" y="520" as="sourcePoint" /> <mxPoint x="550" y="570" as="targetPoint" />@@ -1271,13 +1268,13 @@ <mxPoint x="549.71" y="550" />
</Array> </mxGeometry> </mxCell> - <mxCell id="bshJnAdmZ42-ucYETjzj-70" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="bshJnAdmZ42-ucYETjzj-1" source="bshJnAdmZ42-ucYETjzj-73"> + <mxCell id="ZHVPnpmu-zi4kkNDXHjC-70" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;" edge="1" parent="ZHVPnpmu-zi4kkNDXHjC-1"> <mxGeometry relative="1" as="geometry"> <mxPoint x="1109.41" y="350" as="sourcePoint" /> <mxPoint x="1110" y="610" as="targetPoint" /> </mxGeometry> </mxCell> - <mxCell id="bshJnAdmZ42-ucYETjzj-71" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;" edge="1" parent="bshJnAdmZ42-ucYETjzj-1"> + <mxCell id="ZHVPnpmu-zi4kkNDXHjC-71" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;" edge="1" parent="ZHVPnpmu-zi4kkNDXHjC-1"> <mxGeometry relative="1" as="geometry"> <mxPoint x="1219.4099999999999" y="450" as="sourcePoint" /> <mxPoint x="1219" y="610" as="targetPoint" />@@ -1287,76 +1284,82 @@ <mxPoint x="1219.12" y="530" />
</Array> </mxGeometry> </mxCell> - <mxCell id="bshJnAdmZ42-ucYETjzj-73" value="<div><div>$$\text{resultsAdd}^{\text{old}}$$</div></div>" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;fillColor=#f8cecc;strokeColor=#b85450;fontFamily=Courier New;" vertex="1" parent="bshJnAdmZ42-ucYETjzj-1"> - <mxGeometry x="1050" y="410" width="120" height="40" as="geometry" /> + <mxCell id="ZHVPnpmu-zi4kkNDXHjC-72" value="<div><div>$$\text{numOverwrites}^{\text{old}}$$</div></div>" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;fillColor=#f8cecc;strokeColor=#b85450;fontFamily=Courier New;" vertex="1" parent="ZHVPnpmu-zi4kkNDXHjC-1"> + <mxGeometry x="920" y="360" width="120" height="40" as="geometry" /> </mxCell> - <mxCell id="bshJnAdmZ42-ucYETjzj-74" value="$$\text{stateRoot}^{\text{old}}$$" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;fillColor=#f8cecc;strokeColor=#b85450;fontFamily=Courier New;" vertex="1" parent="bshJnAdmZ42-ucYETjzj-1"> + <mxCell id="ZHVPnpmu-zi4kkNDXHjC-73" value="<div><div>$$\text{resultsAdd}^{\text{old}}$$</div></div>" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;fillColor=#f8cecc;strokeColor=#b85450;fontFamily=Courier New;" vertex="1" parent="ZHVPnpmu-zi4kkNDXHjC-1"> + <mxGeometry x="1050" y="360" width="120" height="40" as="geometry" /> + </mxCell> + <mxCell id="ZHVPnpmu-zi4kkNDXHjC-74" value="$$\text{stateRoot}^{\text{old}}$$" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;fillColor=#f8cecc;strokeColor=#b85450;fontFamily=Courier New;" vertex="1" parent="ZHVPnpmu-zi4kkNDXHjC-1"> <mxGeometry x="1180" y="410" width="80" height="40" as="geometry" /> </mxCell> - <mxCell id="bshJnAdmZ42-ucYETjzj-76" value="<div><div>$$\text{resultsSub}^{\text{old}}$$</div></div>" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;fillColor=#f8cecc;strokeColor=#b85450;fontFamily=Courier New;" vertex="1" parent="bshJnAdmZ42-ucYETjzj-1"> - <mxGeometry x="1050" y="460" width="120" height="40" as="geometry" /> + <mxCell id="ZHVPnpmu-zi4kkNDXHjC-75" value="<div><div>$$\text{numVotes}^{\text{old}}$$</div></div>" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;fillColor=#f8cecc;strokeColor=#b85450;fontFamily=Courier New;" vertex="1" parent="ZHVPnpmu-zi4kkNDXHjC-1"> + <mxGeometry x="920" y="410" width="120" height="40" as="geometry" /> </mxCell> - <mxCell id="bshJnAdmZ42-ucYETjzj-77" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="bshJnAdmZ42-ucYETjzj-1"> + <mxCell id="ZHVPnpmu-zi4kkNDXHjC-76" value="<div><div>$$\text{resultsSub}^{\text{old}}$$</div></div>" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;fillColor=#f8cecc;strokeColor=#b85450;fontFamily=Courier New;" vertex="1" parent="ZHVPnpmu-zi4kkNDXHjC-1"> + <mxGeometry x="1050" y="410" width="120" height="40" as="geometry" /> + </mxCell> + <mxCell id="ZHVPnpmu-zi4kkNDXHjC-77" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="ZHVPnpmu-zi4kkNDXHjC-1"> <mxGeometry relative="1" as="geometry"> <mxPoint x="550" y="520" as="sourcePoint" /> <mxPoint x="550" y="610" as="targetPoint" /> <Array as="points" /> </mxGeometry> </mxCell> - <mxCell id="bshJnAdmZ42-ucYETjzj-78" value="$$(C_1', C_2')_i$$" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;fontFamily=Courier New;strokeColor=none;" vertex="1" parent="bshJnAdmZ42-ucYETjzj-1"> + <mxCell id="ZHVPnpmu-zi4kkNDXHjC-78" value="$$(C_1', C_2')_i$$" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;fontFamily=Courier New;strokeColor=none;" vertex="1" parent="ZHVPnpmu-zi4kkNDXHjC-1"> <mxGeometry x="510" y="543" width="80" height="40" as="geometry" /> </mxCell> - <mxCell id="bshJnAdmZ42-ucYETjzj-79" value="$$\mathsf{ReEnc}_{EPK}(C_1, C_2)_i$$" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;fillColor=#ffe6cc;strokeColor=#d79b00;fontFamily=Courier New;" vertex="1" parent="bshJnAdmZ42-ucYETjzj-1"> + <mxCell id="ZHVPnpmu-zi4kkNDXHjC-79" value="$$\mathsf{ReEnc}_{EPK}(C_1, C_2)_i$$" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;fillColor=#ffe6cc;strokeColor=#d79b00;fontFamily=Courier New;" vertex="1" parent="ZHVPnpmu-zi4kkNDXHjC-1"> <mxGeometry x="470" y="490" width="170" height="40" as="geometry" /> </mxCell> - <mxCell id="bshJnAdmZ42-ucYETjzj-80" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="bshJnAdmZ42-ucYETjzj-1"> + <mxCell id="ZHVPnpmu-zi4kkNDXHjC-80" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="ZHVPnpmu-zi4kkNDXHjC-1"> <mxGeometry relative="1" as="geometry"> <mxPoint x="539.41" y="720" as="sourcePoint" /> <mxPoint x="539.41" y="810" as="targetPoint" /> <Array as="points" /> </mxGeometry> </mxCell> - <mxCell id="bshJnAdmZ42-ucYETjzj-81" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="bshJnAdmZ42-ucYETjzj-1"> + <mxCell id="ZHVPnpmu-zi4kkNDXHjC-81" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="ZHVPnpmu-zi4kkNDXHjC-1"> <mxGeometry relative="1" as="geometry"> <mxPoint x="679.6" y="720" as="sourcePoint" /> <mxPoint x="679.6" y="810" as="targetPoint" /> <Array as="points" /> </mxGeometry> </mxCell> - <mxCell id="bshJnAdmZ42-ucYETjzj-82" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="bshJnAdmZ42-ucYETjzj-1"> + <mxCell id="ZHVPnpmu-zi4kkNDXHjC-82" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="ZHVPnpmu-zi4kkNDXHjC-1"> <mxGeometry relative="1" as="geometry"> <mxPoint x="820" y="720" as="sourcePoint" /> <mxPoint x="820" y="810" as="targetPoint" /> <Array as="points" /> </mxGeometry> </mxCell> - <mxCell id="bshJnAdmZ42-ucYETjzj-83" value="" style="group" vertex="1" connectable="0" parent="bshJnAdmZ42-ucYETjzj-1"> + <mxCell id="ZHVPnpmu-zi4kkNDXHjC-83" value="" style="group" vertex="1" connectable="0" parent="ZHVPnpmu-zi4kkNDXHjC-1"> <mxGeometry x="360" y="610" width="880" height="160" as="geometry" /> </mxCell> - <mxCell id="bshJnAdmZ42-ucYETjzj-84" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="bshJnAdmZ42-ucYETjzj-83"> + <mxCell id="ZHVPnpmu-zi4kkNDXHjC-84" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="ZHVPnpmu-zi4kkNDXHjC-83"> <mxGeometry relative="1" as="geometry"> <mxPoint x="600" y="110" as="sourcePoint" /> <mxPoint x="600" y="200" as="targetPoint" /> <Array as="points" /> </mxGeometry> </mxCell> - <mxCell id="bshJnAdmZ42-ucYETjzj-85" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="bshJnAdmZ42-ucYETjzj-83"> + <mxCell id="ZHVPnpmu-zi4kkNDXHjC-85" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="ZHVPnpmu-zi4kkNDXHjC-83"> <mxGeometry relative="1" as="geometry"> <mxPoint x="720" y="110" as="sourcePoint" /> <mxPoint x="720" y="200" as="targetPoint" /> <Array as="points" /> </mxGeometry> </mxCell> - <mxCell id="bshJnAdmZ42-ucYETjzj-86" value="<div align="center"><b><u>APPLY STATE TRANSITIONS<br><br></u></b></div><div align="left"><b><br></b></div><div align="left"><b>&nbsp;&nbsp;&nbsp; </b>If the vote is a <b>newVote: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </b>If the vote is an <b>overwrite</b>:<b> <br></b></div><div align="left"><br></div><div align="left">&nbsp; &nbsp; <b>1.</b> Include <b>address</b>, <b>voteID</b>, and <b>(C1', C2')</b>.&nbsp;&nbsp; <span style="white-space: pre;">	</span><b>&nbsp;&nbsp;&nbsp; 1.</b> Update vote associated to <b>address</b> to<b> (C1', C2')</b> and include <b>voteID</b>.</div><div align="left">&nbsp; &nbsp; <b>2.</b> Update <b>numVotes</b>.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <b>2.</b> Update <b>numVotes</b> and <b>numOverwrites</b>.<div align="left">&nbsp; &nbsp; <b>3.</b> Update <b>resultsAdd</b>.&nbsp; &nbsp; <span style="white-space: pre;">	</span><span style="white-space: pre;">	</span><span style="white-space: pre;">	</span><span style="white-space: pre;">	</span>&nbsp;&nbsp;&nbsp; <b>3.</b> Update <b>resultsAdd</b> and <b>resultsSub</b>.<br>&nbsp;&nbsp;&nbsp; <b>4.</b> Update <b>stateRoot</b>.<span style="white-space: pre;">	</span><span style="white-space: pre;">	</span><span style="white-space: pre;">	</span><span style="white-space: pre;">	</span>&nbsp;&nbsp;&nbsp; <b>4.</b> Update <b>stateRoot</b>.</div></div>" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;fillColor=#e1d5e7;strokeColor=#9673a6;fontFamily=Courier New;align=left;" vertex="1" parent="bshJnAdmZ42-ucYETjzj-83"> + <mxCell id="ZHVPnpmu-zi4kkNDXHjC-86" value="<div align="center"><b><u>APPLY STATE TRANSITIONS<br><br></u></b></div><div align="left"><b><br></b></div><div align="left"><b>&nbsp;&nbsp;&nbsp; </b>If the vote is a <b>newVote: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </b>If the vote is an <b>overwrite</b>:<b> <br></b></div><div align="left"><br></div><div align="left">&nbsp; &nbsp; <b>1.</b> Include <b>address</b>, <b>voteID</b>, and <b>(C1', C2')</b>.&nbsp;&nbsp; <span style="white-space: pre;">	</span><b>&nbsp;&nbsp;&nbsp; 1.</b> Update vote associated to <b>address</b> to<b> (C1', C2')</b> and include <b>voteID</b>.</div><div align="left">&nbsp; &nbsp; <b>2.</b> Update <b>numVotes</b>.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <b>2.</b> Update <b>numVotes</b> and <b>numOverwrites</b>.<div align="left">&nbsp; &nbsp; <b>3.</b> Update <b>resultsAdd</b>.&nbsp; &nbsp; <span style="white-space: pre;">	</span><span style="white-space: pre;">	</span><span style="white-space: pre;">	</span><span style="white-space: pre;">	</span>&nbsp;&nbsp;&nbsp; <b>3.</b> Update <b>resultsAdd</b> and <b>resultsSub</b>.<br>&nbsp;&nbsp;&nbsp; <b>4.</b> Update <b>stateRoot</b>.<span style="white-space: pre;">	</span><span style="white-space: pre;">	</span><span style="white-space: pre;">	</span><span style="white-space: pre;">	</span>&nbsp;&nbsp;&nbsp; <b>4.</b> Update <b>stateRoot</b>.</div></div>" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;fillColor=#e1d5e7;strokeColor=#9673a6;fontFamily=Courier New;align=left;" vertex="1" parent="ZHVPnpmu-zi4kkNDXHjC-83"> <mxGeometry width="880" height="160" as="geometry" /> </mxCell> - <mxCell id="bshJnAdmZ42-ucYETjzj-87" value="" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;fillColor=none;strokeColor=#9673a6;fontFamily=Courier New;align=left;" vertex="1" parent="bshJnAdmZ42-ucYETjzj-83"> + <mxCell id="ZHVPnpmu-zi4kkNDXHjC-87" value="" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;fillColor=none;strokeColor=#9673a6;fontFamily=Courier New;align=left;" vertex="1" parent="ZHVPnpmu-zi4kkNDXHjC-83"> <mxGeometry x="10" y="50" width="350" height="100" as="geometry" /> </mxCell> - <mxCell id="bshJnAdmZ42-ucYETjzj-88" value="" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;fillColor=none;strokeColor=#9673a6;fontFamily=Courier New;align=left;" vertex="1" parent="bshJnAdmZ42-ucYETjzj-83"> + <mxCell id="ZHVPnpmu-zi4kkNDXHjC-88" value="" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;fillColor=none;strokeColor=#9673a6;fontFamily=Courier New;align=left;" vertex="1" parent="ZHVPnpmu-zi4kkNDXHjC-83"> <mxGeometry x="375" y="50" width="495" height="100" as="geometry" /> </mxCell> - <mxCell id="bshJnAdmZ42-ucYETjzj-89" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;endArrow=none;startFill=0;endFill=1;" edge="1" parent="bshJnAdmZ42-ucYETjzj-1" source="bshJnAdmZ42-ucYETjzj-52"> + <mxCell id="ZHVPnpmu-zi4kkNDXHjC-89" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;endArrow=none;startFill=0;endFill=1;" edge="1" parent="ZHVPnpmu-zi4kkNDXHjC-1" source="ZHVPnpmu-zi4kkNDXHjC-52"> <mxGeometry relative="1" as="geometry"> <mxPoint x="-430" y="604.47" as="sourcePoint" /> <mxPoint x="200" y="510" as="targetPoint" />@@ -1367,244 +1370,190 @@ <mxPoint x="200" y="510" />
</Array> </mxGeometry> </mxCell> - <mxCell id="bshJnAdmZ42-ucYETjzj-90" value="<div><div><div><div><div><div><div><div><div><div>$$k = \text{Hash}(k)$$</div></div></div></div></div></div></div></div><div><div><div></div></div></div></div></div>" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;fontFamily=Courier New;" vertex="1" parent="bshJnAdmZ42-ucYETjzj-1"> + <mxCell id="ZHVPnpmu-zi4kkNDXHjC-90" value="<div><div><div><div><div><div><div><div><div><div>$$k = \text{Hash}(k)$$</div></div></div></div></div></div></div></div><div><div><div></div></div></div></div></div>" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;fontFamily=Courier New;" vertex="1" parent="ZHVPnpmu-zi4kkNDXHjC-1"> <mxGeometry x="230" y="550" width="100" height="40" as="geometry" /> </mxCell> - <mxCell id="bshJnAdmZ42-ucYETjzj-91" value="$$\text{Iterate over } i$$" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;fontFamily=Courier New;align=center;spacingBottom=-4;" vertex="1" parent="bshJnAdmZ42-ucYETjzj-1"> - <mxGeometry x="290" y="390" width="160" height="53" as="geometry" /> + <mxCell id="ZHVPnpmu-zi4kkNDXHjC-91" value="$$\text{Iterate over } i$$" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;fontFamily=Courier New;align=center;spacingBottom=-4;" vertex="1" parent="ZHVPnpmu-zi4kkNDXHjC-1"> + <mxGeometry x="290" y="340" width="130" height="53" as="geometry" /> </mxCell> - <mxCell id="bshJnAdmZ42-ucYETjzj-92" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;" edge="1" parent="bshJnAdmZ42-ucYETjzj-1" source="bshJnAdmZ42-ucYETjzj-91" target="bshJnAdmZ42-ucYETjzj-91"> + <mxCell id="ZHVPnpmu-zi4kkNDXHjC-92" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;" edge="1" parent="ZHVPnpmu-zi4kkNDXHjC-1" source="ZHVPnpmu-zi4kkNDXHjC-91" target="ZHVPnpmu-zi4kkNDXHjC-91"> <mxGeometry relative="1" as="geometry" /> </mxCell> - <mxCell id="bshJnAdmZ42-ucYETjzj-93" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="bshJnAdmZ42-ucYETjzj-1"> + <mxCell id="ZHVPnpmu-zi4kkNDXHjC-93" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="ZHVPnpmu-zi4kkNDXHjC-1"> <mxGeometry relative="1" as="geometry"> <mxPoint x="1079.38" y="850" as="sourcePoint" /> <mxPoint x="1079.38" y="960" as="targetPoint" /> </mxGeometry> </mxCell> - <mxCell id="bshJnAdmZ42-ucYETjzj-94" value="<div><div>$$\text{numVotes}^{\text{new}}$$</div></div>" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;fillColor=#d5e8d4;strokeColor=#82b366;fontFamily=Courier New;" vertex="1" parent="bshJnAdmZ42-ucYETjzj-1"> + <mxCell id="ZHVPnpmu-zi4kkNDXHjC-94" value="<div><div>$$\text{numVotes}^{\text{new}}$$</div></div>" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;fillColor=#d5e8d4;strokeColor=#82b366;fontFamily=Courier New;" vertex="1" parent="ZHVPnpmu-zi4kkNDXHjC-1"> <mxGeometry x="620" y="960" width="120" height="40" as="geometry" /> </mxCell> - <mxCell id="bshJnAdmZ42-ucYETjzj-95" value="<div><div>$$\text{numOverwrites}^{\text{new}}$$</div></div>" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;fillColor=#d5e8d4;strokeColor=#82b366;fontFamily=Courier New;" vertex="1" parent="bshJnAdmZ42-ucYETjzj-1"> + <mxCell id="ZHVPnpmu-zi4kkNDXHjC-95" value="<div><div>$$\text{numOverwrites}^{\text{new}}$$</div></div>" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;fillColor=#d5e8d4;strokeColor=#82b366;fontFamily=Courier New;" vertex="1" parent="ZHVPnpmu-zi4kkNDXHjC-1"> <mxGeometry x="480" y="960" width="120" height="40" as="geometry" /> </mxCell> - <mxCell id="bshJnAdmZ42-ucYETjzj-96" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="bshJnAdmZ42-ucYETjzj-1"> + <mxCell id="ZHVPnpmu-zi4kkNDXHjC-96" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="ZHVPnpmu-zi4kkNDXHjC-1"> <mxGeometry relative="1" as="geometry"> - <mxPoint x="760" y="-80" as="sourcePoint" /> - <mxPoint x="760" y="130" as="targetPoint" /> + <mxPoint x="760" y="-130" as="sourcePoint" /> + <mxPoint x="760" y="80" as="targetPoint" /> <Array as="points" /> </mxGeometry> </mxCell> - <mxCell id="bshJnAdmZ42-ucYETjzj-97" value="<div>$$\text{MTProofs}_i$$</div><div>(inclusion or non-inclusion)</div>" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;fillColor=#f8cecc;strokeColor=#b85450;fontFamily=Courier New;" vertex="1" parent="bshJnAdmZ42-ucYETjzj-1"> - <mxGeometry x="720" y="-150" width="80" height="120" as="geometry" /> - </mxCell> - <mxCell id="bshJnAdmZ42-ucYETjzj-98" value="<div align="left"><b>&nbsp;&nbsp; MISSING</b></div><div align="left"><b><br></b></div><div align="left">&nbsp;&nbsp; <b>1.</b> For <i>some</i> existing leafs, also reencrypt the votes.</div><div align="left">&nbsp;&nbsp; <b>2.</b> Data blobs.</div><div align="left">&nbsp;&nbsp; <b>3.</b> Add some details, like specifics of resultsAdd.</div>" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;fillColor=#647687;strokeColor=#314354;fontFamily=Courier New;align=left;fontColor=#ffffff;" vertex="1" parent="bshJnAdmZ42-ucYETjzj-1"> - <mxGeometry x="1210" y="-280" width="380" height="150" as="geometry" /> - </mxCell> - <mxCell id="bshJnAdmZ42-ucYETjzj-99" value="AGGREGATION VERIFICATION" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontFamily=Courier New;fillColor=#fff2cc;strokeColor=#d6b656;fontSize=11;" vertex="1" parent="bshJnAdmZ42-ucYETjzj-1"> - <mxGeometry x="-200" y="1097.18" width="440" height="40" as="geometry" /> - </mxCell> - <mxCell id="bshJnAdmZ42-ucYETjzj-100" value="" style="strokeWidth=1;html=1;shape=mxgraph.flowchart.annotation_2;align=left;labelPosition=right;pointerEvents=1;rotation=-90;" vertex="1" parent="bshJnAdmZ42-ucYETjzj-1"> - <mxGeometry x="12.17999999999995" y="860" width="20" height="435" as="geometry" /> - </mxCell> - <mxCell id="bshJnAdmZ42-ucYETjzj-101" value="TRANSITION VERIFICATION" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontFamily=Courier New;fillColor=#e1d5e7;strokeColor=#9673a6;fontSize=11;" vertex="1" parent="bshJnAdmZ42-ucYETjzj-1"> - <mxGeometry x="280" y="1097.18" width="1120" height="40" as="geometry" /> - </mxCell> - <mxCell id="bshJnAdmZ42-ucYETjzj-102" value="" style="strokeWidth=1;html=1;shape=mxgraph.flowchart.annotation_2;align=left;labelPosition=right;pointerEvents=1;rotation=-90;" vertex="1" parent="bshJnAdmZ42-ucYETjzj-1"> - <mxGeometry x="832.5" y="517.5" width="20" height="1120" as="geometry" /> + <mxCell id="ZHVPnpmu-zi4kkNDXHjC-97" value="<div>$$\text{MTProofs}_i$$</div><div>(inclusion or non-inclusion)</div>" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;fillColor=#f8cecc;strokeColor=#b85450;fontFamily=Courier New;" vertex="1" parent="ZHVPnpmu-zi4kkNDXHjC-1"> + <mxGeometry x="720" y="-200" width="80" height="120" as="geometry" /> </mxCell> - <mxCell id="k71UCUNJWLWW3Epa4zVm-0" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;endArrow=none;startFill=0;" edge="1" parent="bshJnAdmZ42-ucYETjzj-1"> - <mxGeometry relative="1" as="geometry"> - <mxPoint x="980" y="420" as="sourcePoint" /> - <mxPoint x="980" y="490" as="targetPoint" /> - </mxGeometry> + <mxCell id="ZHVPnpmu-zi4kkNDXHjC-98" value="<div align="left"><b>&nbsp;&nbsp; MISSING</b></div><div align="left"><b><br></b></div><div align="left">&nbsp;&nbsp; <b>1.</b> For <i>some</i> existing leafs, also reencrypt the votes.</div><div align="left">&nbsp;&nbsp; <b>2.</b> Data blobs.</div><div align="left">&nbsp;&nbsp; <b>3.</b> Add some details, like specifics of resultsAdd.</div>" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;fillColor=#647687;strokeColor=#314354;fontFamily=Courier New;align=left;fontColor=#ffffff;" vertex="1" parent="ZHVPnpmu-zi4kkNDXHjC-1"> + <mxGeometry x="1200" y="-320" width="380" height="150" as="geometry" /> </mxCell> - <mxCell id="bshJnAdmZ42-ucYETjzj-75" value="<div><div>$$\text{numVotes}^{\text{old}}$$</div></div>" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;fillColor=#f8cecc;strokeColor=#b85450;fontFamily=Courier New;" vertex="1" parent="bshJnAdmZ42-ucYETjzj-1"> - <mxGeometry x="920" y="460" width="120" height="40" as="geometry" /> + <mxCell id="ZHVPnpmu-zi4kkNDXHjC-99" value="AGGREGATION VERIFICATION" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontFamily=Courier New;fillColor=#fff2cc;strokeColor=#d6b656;fontSize=11;" vertex="1" parent="ZHVPnpmu-zi4kkNDXHjC-1"> + <mxGeometry x="-200" y="1117.18" width="440" height="40" as="geometry" /> </mxCell> - <mxCell id="bshJnAdmZ42-ucYETjzj-72" value="<div><div>$$\text{numOverwrites}^{\text{old}}$$</div></div>" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;fillColor=#f8cecc;strokeColor=#b85450;fontFamily=Courier New;" vertex="1" parent="bshJnAdmZ42-ucYETjzj-1"> - <mxGeometry x="920" y="410" width="120" height="40" as="geometry" /> + <mxCell id="ZHVPnpmu-zi4kkNDXHjC-100" value="" style="strokeWidth=1;html=1;shape=mxgraph.flowchart.annotation_2;align=left;labelPosition=right;pointerEvents=1;rotation=-90;" vertex="1" parent="ZHVPnpmu-zi4kkNDXHjC-1"> + <mxGeometry x="12.17999999999995" y="880" width="20" height="435" as="geometry" /> </mxCell> - <mxCell id="ZOmDL6wXEoRELoglNmZe-0" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;" edge="1" parent="bshJnAdmZ42-ucYETjzj-1" source="bshJnAdmZ42-ucYETjzj-91" target="bshJnAdmZ42-ucYETjzj-91"> - <mxGeometry relative="1" as="geometry" /> + <mxCell id="ZHVPnpmu-zi4kkNDXHjC-101" value="TRANSITION VERIFICATION" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontFamily=Courier New;fillColor=#e1d5e7;strokeColor=#9673a6;fontSize=11;" vertex="1" parent="ZHVPnpmu-zi4kkNDXHjC-1"> + <mxGeometry x="280" y="1117.18" width="1120" height="40" as="geometry" /> </mxCell> - <mxCell id="kXBYuY-UTKVdfyJdre-C-0" value="$$\text{address}_i$$" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;fillColor=default;strokeColor=none;fontFamily=Courier New;" vertex="1" parent="bshJnAdmZ42-ucYETjzj-1"> - <mxGeometry x="610" y="64" width="60" height="39.88" as="geometry" /> + <mxCell id="ZHVPnpmu-zi4kkNDXHjC-102" value="" style="strokeWidth=1;html=1;shape=mxgraph.flowchart.annotation_2;align=left;labelPosition=right;pointerEvents=1;rotation=-90;" vertex="1" parent="ZHVPnpmu-zi4kkNDXHjC-1"> + <mxGeometry x="832.5" y="537.5" width="20" height="1120" as="geometry" /> </mxCell> </root> </mxGraphModel> </diagram> - <diagram name="4. state-transition-circuit (old)" id="x6B-zyxiSRkjN1jwR15T"> - <mxGraphModel dx="3782" dy="1928" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1100" pageHeight="850" math="1" shadow="0"> + <diagram name="5. results-circuit" id="vOdGFxvcKQLxlt7TpMJr"> + <mxGraphModel dx="1850" dy="1092" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1100" pageHeight="850" math="1" shadow="0"> <root> - <mxCell id="ZdTqr67gGV_Two7x-mBu-0" /> - <mxCell id="ZdTqr67gGV_Two7x-mBu-1" parent="ZdTqr67gGV_Two7x-mBu-0" /> - <mxCell id="phJliGzTQF7XW9zZiR-q-19" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.727;entryY=-0.02;entryDx=0;entryDy=0;entryPerimeter=0;" parent="ZdTqr67gGV_Two7x-mBu-1" source="ZdTqr67gGV_Two7x-mBu-4" target="JGRwFc0fyMI5h4bvW3bD-0" edge="1"> - <mxGeometry relative="1" as="geometry" /> + <mxCell id="bshJnAdmZ42-ucYETjzj-0" /> + <mxCell id="bshJnAdmZ42-ucYETjzj-1" parent="bshJnAdmZ42-ucYETjzj-0" /> + <mxCell id="njsKSg5quu9oUWfDPbnt-0" value="<div><br></div>" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;" vertex="1" parent="bshJnAdmZ42-ucYETjzj-1"> + <mxGeometry x="80" y="50" width="1170" height="530" as="geometry" /> </mxCell> - <mxCell id="ZdTqr67gGV_Two7x-mBu-4" value="$$\text{voteID}_i$$" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;fillColor=#f8cecc;strokeColor=#b85450;fontFamily=Courier New;" parent="ZdTqr67gGV_Two7x-mBu-1" vertex="1"> - <mxGeometry x="120" y="40" width="80" height="40" as="geometry" /> + <mxCell id="EhFKpIqwLm2i5KqQf0Kn-0" value="<div><br></div>" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;" vertex="1" parent="bshJnAdmZ42-ucYETjzj-1"> + <mxGeometry x="120" y="140" width="1090" height="360" as="geometry" /> </mxCell> - <mxCell id="ZdTqr67gGV_Two7x-mBu-9" value="$$\text{censusRoot}$$" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;fillColor=#f8cecc;strokeColor=#b85450;fontFamily=Courier New;" parent="ZdTqr67gGV_Two7x-mBu-1" vertex="1"> - <mxGeometry x="440" y="-10" width="80" height="40" as="geometry" /> - </mxCell> - <mxCell id="ZdTqr67gGV_Two7x-mBu-10" value="<div>$$\text{ballotMode}$$</div>" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;fillColor=#f8cecc;strokeColor=#b85450;fontFamily=Courier New;" parent="ZdTqr67gGV_Two7x-mBu-1" vertex="1"> - <mxGeometry x="440" y="-110" width="80" height="40" as="geometry" /> - </mxCell> - <mxCell id="ZdTqr67gGV_Two7x-mBu-11" value="$$EPK$$" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;fillColor=#f8cecc;strokeColor=#b85450;fontFamily=Courier New;" parent="ZdTqr67gGV_Two7x-mBu-1" vertex="1"> - <mxGeometry x="440" y="-60" width="80" height="40" as="geometry" /> - </mxCell> - <mxCell id="phJliGzTQF7XW9zZiR-q-13" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" parent="ZdTqr67gGV_Two7x-mBu-1" source="ZdTqr67gGV_Two7x-mBu-12" target="phJliGzTQF7XW9zZiR-q-1" edge="1"> + <mxCell id="w11Yu14kjo9wnOEZIBzt-8" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.9;entryY=-0.003;entryDx=0;entryDy=0;entryPerimeter=0;" edge="1" parent="bshJnAdmZ42-ucYETjzj-1" source="bshJnAdmZ42-ucYETjzj-11" target="bshJnAdmZ42-ucYETjzj-63"> <mxGeometry relative="1" as="geometry" /> </mxCell> - <mxCell id="ZdTqr67gGV_Two7x-mBu-12" value="$$(C_1, C_2)_i$$" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;fillColor=#f8cecc;strokeColor=#b85450;fontFamily=Courier New;" parent="ZdTqr67gGV_Two7x-mBu-1" vertex="1"> - <mxGeometry x="320" y="40" width="80" height="40" as="geometry" /> - </mxCell> - <mxCell id="ZdTqr67gGV_Two7x-mBu-13" value="<div>$$\text{processID}$$</div>" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;fillColor=#f8cecc;strokeColor=#b85450;fontFamily=Courier New;" parent="ZdTqr67gGV_Two7x-mBu-1" vertex="1"> - <mxGeometry x="440" y="40" width="80" height="40" as="geometry" /> - </mxCell> - <mxCell id="ZdTqr67gGV_Two7x-mBu-14" value="$$pk_i$$" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;fillColor=#f8cecc;strokeColor=#b85450;fontFamily=Courier New;" parent="ZdTqr67gGV_Two7x-mBu-1" vertex="1"> - <mxGeometry x="120" y="-10" width="80" height="40" as="geometry" /> + <mxCell id="bshJnAdmZ42-ucYETjzj-11" value="$$\text{stateRoot}$$" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;fillColor=#d5e8d4;strokeColor=#82b366;fontFamily=Courier New;" parent="bshJnAdmZ42-ucYETjzj-1" vertex="1"> + <mxGeometry x="1100" y="80" width="80" height="40" as="geometry" /> </mxCell> - <mxCell id="phJliGzTQF7XW9zZiR-q-21" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" parent="ZdTqr67gGV_Two7x-mBu-1" source="ZdTqr67gGV_Two7x-mBu-32" edge="1"> + <mxCell id="bshJnAdmZ42-ucYETjzj-14" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;" parent="bshJnAdmZ42-ucYETjzj-1" edge="1"> <mxGeometry relative="1" as="geometry"> - <mxPoint x="-100" y="160" as="targetPoint" /> + <mxPoint x="505" y="1200" as="sourcePoint" /> + <mxPoint x="505" y="1200" as="targetPoint" /> </mxGeometry> </mxCell> - <mxCell id="ZdTqr67gGV_Two7x-mBu-32" value="<div style="font-size: 11px;">$$\text{aggregationProof}_i$$</div>" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;fillColor=#f8cecc;strokeColor=#b85450;fontFamily=Courier New;" parent="ZdTqr67gGV_Two7x-mBu-1" vertex="1"> - <mxGeometry x="-160" y="40" width="120" height="40" as="geometry" /> + <mxCell id="bshJnAdmZ42-ucYETjzj-37" value="true" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;fontFamily=Courier New;strokeColor=none;" parent="bshJnAdmZ42-ucYETjzj-1" vertex="1"> + <mxGeometry x="940" y="520" width="80" height="40" as="geometry" /> </mxCell> - <mxCell id="xnlEkFcDW3wDAF-mUqor-2" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" parent="ZdTqr67gGV_Two7x-mBu-1" source="JGRwFc0fyMI5h4bvW3bD-0" target="xnlEkFcDW3wDAF-mUqor-0" edge="1"> - <mxGeometry relative="1" as="geometry"> - <mxPoint x="60" y="270" as="targetPoint" /> - </mxGeometry> + <mxCell id="bshJnAdmZ42-ucYETjzj-41" value="$$EPK$$" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;fillColor=#f8cecc;strokeColor=#b85450;fontFamily=Courier New;" parent="bshJnAdmZ42-ucYETjzj-1" vertex="1"> + <mxGeometry x="150" y="80" width="50" height="40" as="geometry" /> </mxCell> - <mxCell id="JGRwFc0fyMI5h4bvW3bD-0" value="recursive SNARK batch verifier" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;fillColor=#fff2cc;strokeColor=#d6b656;fontFamily=Courier New;" parent="ZdTqr67gGV_Two7x-mBu-1" vertex="1"> - <mxGeometry x="-160" y="160" width="440" height="40" as="geometry" /> + <mxCell id="w11Yu14kjo9wnOEZIBzt-6" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.75;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="bshJnAdmZ42-ucYETjzj-1" source="bshJnAdmZ42-ucYETjzj-46" target="w11Yu14kjo9wnOEZIBzt-0"> + <mxGeometry relative="1" as="geometry" /> </mxCell> - <mxCell id="tK7HVng925d0syRrVfO4-0" value="AGGREGATION VERIFICATION" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontFamily=Courier New;fillColor=#fff2cc;strokeColor=#d6b656;fontSize=11;" parent="ZdTqr67gGV_Two7x-mBu-1" vertex="1"> - <mxGeometry x="-170" y="440" width="440" height="40" as="geometry" /> + <mxCell id="bshJnAdmZ42-ucYETjzj-46" value="<div>$$\text{resultsAdd}$$</div>" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;fillColor=#f8cecc;strokeColor=#b85450;fontFamily=Courier New;" parent="bshJnAdmZ42-ucYETjzj-1" vertex="1"> + <mxGeometry x="610" y="80" width="120" height="40" as="geometry" /> </mxCell> - <mxCell id="d2DoWqZH1p_f5rfd7LTq-0" value="" style="strokeWidth=1;html=1;shape=mxgraph.flowchart.annotation_2;align=left;labelPosition=right;pointerEvents=1;rotation=-90;" parent="ZdTqr67gGV_Two7x-mBu-1" vertex="1"> - <mxGeometry x="42.18" y="202.82" width="20" height="435" as="geometry" /> + <mxCell id="w11Yu14kjo9wnOEZIBzt-5" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.25;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="bshJnAdmZ42-ucYETjzj-1" source="bshJnAdmZ42-ucYETjzj-47" target="w11Yu14kjo9wnOEZIBzt-0"> + <mxGeometry relative="1" as="geometry" /> </mxCell> - <mxCell id="wiVq041o4hXXWoejm4On-0" value="TRANSITION VERIFICATION" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontFamily=Courier New;fillColor=#e1d5e7;strokeColor=#9673a6;fontSize=11;" parent="ZdTqr67gGV_Two7x-mBu-1" vertex="1"> - <mxGeometry x="720" y="440" width="400" height="40" as="geometry" /> + <mxCell id="bshJnAdmZ42-ucYETjzj-47" value="<div>$$\text{resultsSub}$$</div>" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;fillColor=#f8cecc;strokeColor=#b85450;fontFamily=Courier New;" parent="bshJnAdmZ42-ucYETjzj-1" vertex="1"> + <mxGeometry x="470" y="80" width="120" height="40" as="geometry" /> </mxCell> - <mxCell id="wiVq041o4hXXWoejm4On-1" value="VOTES COUNT" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontFamily=Courier New;fillColor=#dae8fc;strokeColor=#6c8ebf;fontSize=11;" parent="ZdTqr67gGV_Two7x-mBu-1" vertex="1"> - <mxGeometry x="480" y="440" width="200" height="40" as="geometry" /> + <mxCell id="bshJnAdmZ42-ucYETjzj-53" value="" style="text;whiteSpace=wrap;html=1;" parent="bshJnAdmZ42-ucYETjzj-1" vertex="1"> + <mxGeometry x="880" y="1020" width="60" height="50" as="geometry" /> </mxCell> - <mxCell id="phJliGzTQF7XW9zZiR-q-0" value="VOTES REENCRYPTION" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontFamily=Courier New;fillColor=#ffe6cc;strokeColor=#d79b00;fontSize=11;" parent="ZdTqr67gGV_Two7x-mBu-1" vertex="1"> - <mxGeometry x="290" y="440" width="140" height="40" as="geometry" /> - </mxCell> - <mxCell id="phJliGzTQF7XW9zZiR-q-11" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.083;entryY=-0.018;entryDx=0;entryDy=0;entryPerimeter=0;" parent="ZdTqr67gGV_Two7x-mBu-1" source="phJliGzTQF7XW9zZiR-q-1" target="phJliGzTQF7XW9zZiR-q-10" edge="1"> + <mxCell id="32wBmxPFM4Aquibm1vis-1" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="bshJnAdmZ42-ucYETjzj-1" source="bshJnAdmZ42-ucYETjzj-63" target="bshJnAdmZ42-ucYETjzj-37"> <mxGeometry relative="1" as="geometry"> - <mxPoint x="710" y="300" as="targetPoint" /> - <Array as="points"> - <mxPoint x="360" y="220" /> - <mxPoint x="680" y="220" /> - <mxPoint x="680" y="300" /> - <mxPoint x="680" y="300" /> - </Array> + <mxPoint x="980" y="400" as="targetPoint" /> </mxGeometry> </mxCell> - <mxCell id="phJliGzTQF7XW9zZiR-q-1" value="$$ReEnc()$$" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;fillColor=#ffe6cc;strokeColor=#d79b00;fontFamily=Courier New;" parent="ZdTqr67gGV_Two7x-mBu-1" vertex="1"> - <mxGeometry x="320" y="160" width="80" height="40" as="geometry" /> + <mxCell id="bshJnAdmZ42-ucYETjzj-63" value="<div align="center">Verify the MTProofs that prove that the first leafs of the tree store the public parameters of the voting process:<br><br></div><div align="center">0x3 = <b>EPK</b>, 0x4 = <b>resultsAdd</b>, 0x5 = <b>resultsAdd</b>.</div>" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;fillColor=#e1d5e7;strokeColor=#9673a6;fontFamily=Courier New;align=center;" parent="bshJnAdmZ42-ucYETjzj-1" vertex="1"> + <mxGeometry x="780" y="200" width="400" height="80" as="geometry" /> </mxCell> - <mxCell id="phJliGzTQF7XW9zZiR-q-25" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.271;entryY=0;entryDx=0;entryDy=0;entryPerimeter=0;" parent="ZdTqr67gGV_Two7x-mBu-1" source="phJliGzTQF7XW9zZiR-q-3" target="phJliGzTQF7XW9zZiR-q-10" edge="1"> - <mxGeometry relative="1" as="geometry"> - <mxPoint x="770" y="190" as="targetPoint" /> - </mxGeometry> + <mxCell id="w11Yu14kjo9wnOEZIBzt-7" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.351;entryY=-0.006;entryDx=0;entryDy=0;entryPerimeter=0;" edge="1" parent="bshJnAdmZ42-ucYETjzj-1" source="bshJnAdmZ42-ucYETjzj-97" target="bshJnAdmZ42-ucYETjzj-63"> + <mxGeometry relative="1" as="geometry" /> </mxCell> - <mxCell id="phJliGzTQF7XW9zZiR-q-3" value="<div>$$\text{totalNewVotes}$$</div>" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;fillColor=#d5e8d4;strokeColor=#82b366;fontFamily=Courier New;" parent="ZdTqr67gGV_Two7x-mBu-1" vertex="1"> - <mxGeometry x="720" y="80" width="100" height="40" as="geometry" /> + <mxCell id="bshJnAdmZ42-ucYETjzj-97" value="<div>$$\text{MTProofs}_i \text{ for } \text{EPK, resultsSub, resultsAdd}$$</div>" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;fillColor=#f8cecc;strokeColor=#b85450;fontFamily=Courier New;" parent="bshJnAdmZ42-ucYETjzj-1" vertex="1"> + <mxGeometry x="780" y="80" width="280" height="40" as="geometry" /> </mxCell> - <mxCell id="phJliGzTQF7XW9zZiR-q-4" value="<div>$$\text{totalOverwrites}$$</div>" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;fillColor=#d5e8d4;strokeColor=#82b366;fontFamily=Courier New;" parent="ZdTqr67gGV_Two7x-mBu-1" vertex="1"> - <mxGeometry x="720" y="30" width="100" height="40" as="geometry" /> + <mxCell id="bshJnAdmZ42-ucYETjzj-99" value="DECRYPTION KEY CORRECTNESS" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontFamily=Courier New;fillColor=#fff2cc;strokeColor=#d6b656;fontSize=11;" parent="bshJnAdmZ42-ucYETjzj-1" vertex="1"> + <mxGeometry x="140" y="627.1800000000001" width="180" height="40" as="geometry" /> </mxCell> - <mxCell id="phJliGzTQF7XW9zZiR-q-5" value="$$AddBN254()$$" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;fillColor=#dae8fc;strokeColor=#6c8ebf;fontFamily=Courier New;" parent="ZdTqr67gGV_Two7x-mBu-1" vertex="1"> - <mxGeometry x="520" y="320" width="80" height="40" as="geometry" /> + <mxCell id="bshJnAdmZ42-ucYETjzj-100" value="" style="strokeWidth=1;html=1;shape=mxgraph.flowchart.annotation_2;align=left;labelPosition=right;pointerEvents=1;rotation=-90;" parent="bshJnAdmZ42-ucYETjzj-1" vertex="1"> + <mxGeometry x="219.68" y="517.5" width="20" height="180" as="geometry" /> </mxCell> - <mxCell id="phJliGzTQF7XW9zZiR-q-6" value="$$\text{stateRoot}^{\text{old}}$$" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;fillColor=#d5e8d4;strokeColor=#82b366;fontFamily=Courier New;" parent="ZdTqr67gGV_Two7x-mBu-1" vertex="1"> - <mxGeometry x="1040" y="30" width="80" height="40" as="geometry" /> + <mxCell id="bshJnAdmZ42-ucYETjzj-101" value="RESULTS INTEGRITY" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontFamily=Courier New;fillColor=#e1d5e7;strokeColor=#9673a6;fontSize=11;" parent="bshJnAdmZ42-ucYETjzj-1" vertex="1"> + <mxGeometry x="760" y="627.1800000000001" width="420" height="40" as="geometry" /> </mxCell> - <mxCell id="phJliGzTQF7XW9zZiR-q-7" value="$$\text{stateRoot}^{\text{new}}$$" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;fillColor=#d5e8d4;strokeColor=#82b366;fontFamily=Courier New;" parent="ZdTqr67gGV_Two7x-mBu-1" vertex="1"> - <mxGeometry x="1040" y="80" width="80" height="40" as="geometry" /> + <mxCell id="bshJnAdmZ42-ucYETjzj-102" value="" style="strokeWidth=1;html=1;shape=mxgraph.flowchart.annotation_2;align=left;labelPosition=right;pointerEvents=1;rotation=-90;" parent="bshJnAdmZ42-ucYETjzj-1" vertex="1"> + <mxGeometry x="961.24" y="396.27" width="20" height="422.49" as="geometry" /> </mxCell> - <mxCell id="phJliGzTQF7XW9zZiR-q-27" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" parent="ZdTqr67gGV_Two7x-mBu-1" source="phJliGzTQF7XW9zZiR-q-8" target="phJliGzTQF7XW9zZiR-q-10" edge="1"> + <mxCell id="w11Yu14kjo9wnOEZIBzt-4" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.112;entryY=-0.025;entryDx=0;entryDy=0;entryPerimeter=0;" edge="1" parent="bshJnAdmZ42-ucYETjzj-1" source="32wBmxPFM4Aquibm1vis-2" target="w11Yu14kjo9wnOEZIBzt-1"> <mxGeometry relative="1" as="geometry"> - <mxPoint x="880" y="215" as="targetPoint" /> + <mxPoint x="365" y="200" as="targetPoint" /> </mxGeometry> </mxCell> - <mxCell id="phJliGzTQF7XW9zZiR-q-8" value="merkleTree<br>parameters<br>witness" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;fillColor=#f8cecc;strokeColor=#b85450;fontFamily=Courier New;" parent="ZdTqr67gGV_Two7x-mBu-1" vertex="1"> - <mxGeometry x="840" y="30" width="80" height="90" as="geometry" /> + <mxCell id="32wBmxPFM4Aquibm1vis-2" value="$$ESK$$" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;fillColor=#f8cecc;strokeColor=#b85450;fontFamily=Courier New;" vertex="1" parent="bshJnAdmZ42-ucYETjzj-1"> + <mxGeometry x="340" y="80" width="50" height="40" as="geometry" /> + </mxCell> + <mxCell id="w11Yu14kjo9wnOEZIBzt-2" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.907;entryY=0.002;entryDx=0;entryDy=0;entryPerimeter=0;" edge="1" parent="bshJnAdmZ42-ucYETjzj-1" source="w11Yu14kjo9wnOEZIBzt-0" target="w11Yu14kjo9wnOEZIBzt-1"> + <mxGeometry relative="1" as="geometry" /> </mxCell> - <mxCell id="phJliGzTQF7XW9zZiR-q-9" value="merkleTree<br>state transition proofs" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;fillColor=#f8cecc;strokeColor=#b85450;fontFamily=Courier New;" parent="ZdTqr67gGV_Two7x-mBu-1" vertex="1"> - <mxGeometry x="940" y="30" width="80" height="90" as="geometry" /> + <mxCell id="w11Yu14kjo9wnOEZIBzt-0" value="<div>$$\text{encryptedResults} = \text{resultsAdd} - \text{resultsSub}$$</div>" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;fillColor=#dae8fc;strokeColor=#6c8ebf;fontFamily=Courier New;" vertex="1" parent="bshJnAdmZ42-ucYETjzj-1"> + <mxGeometry x="460" y="200" width="280" height="40" as="geometry" /> </mxCell> - <mxCell id="phJliGzTQF7XW9zZiR-q-10" value="$$MerkleTreeProcessor()$$" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;fillColor=#e1d5e7;strokeColor=#9673a6;fontFamily=Courier New;" parent="ZdTqr67gGV_Two7x-mBu-1" vertex="1"> - <mxGeometry x="640" y="320" width="480" height="40" as="geometry" /> + <mxCell id="w11Yu14kjo9wnOEZIBzt-1" value="<div>$$\text{results} = \text{Dec}_{ESK}(\text{encryptedResults})$$</div>" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;fillColor=#dae8fc;strokeColor=#6c8ebf;fontFamily=Courier New;" vertex="1" parent="bshJnAdmZ42-ucYETjzj-1"> + <mxGeometry x="340" y="320" width="230" height="40" as="geometry" /> </mxCell> - <mxCell id="phJliGzTQF7XW9zZiR-q-12" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.25;entryY=0;entryDx=0;entryDy=0;startArrow=oval;startFill=1;" parent="ZdTqr67gGV_Two7x-mBu-1" edge="1"> + <mxCell id="w11Yu14kjo9wnOEZIBzt-9" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;startArrow=oval;startFill=1;" edge="1" parent="bshJnAdmZ42-ucYETjzj-1"> <mxGeometry relative="1" as="geometry"> - <mxPoint x="560" y="220" as="sourcePoint" /> - <mxPoint x="560" y="320" as="targetPoint" /> + <mxPoint x="365" y="160" as="sourcePoint" /> + <mxPoint x="260" y="200" as="targetPoint" /> <Array as="points"> - <mxPoint x="560" y="230" /> - <mxPoint x="560" y="230" /> + <mxPoint x="260" y="160" /> </Array> </mxGeometry> </mxCell> - <mxCell id="phJliGzTQF7XW9zZiR-q-14" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;startArrow=oval;startFill=1;" parent="ZdTqr67gGV_Two7x-mBu-1" edge="1"> + <mxCell id="w11Yu14kjo9wnOEZIBzt-10" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;" edge="1" parent="bshJnAdmZ42-ucYETjzj-1" source="w11Yu14kjo9wnOEZIBzt-1"> <mxGeometry relative="1" as="geometry"> - <mxPoint x="360" y="140" as="sourcePoint" /> - <mxPoint x="240" y="160" as="targetPoint" /> - <Array as="points"> - <mxPoint x="240" y="140" /> - <mxPoint x="240" y="160" /> - </Array> + <mxPoint x="490" y="430" as="sourcePoint" /> + <mxPoint x="455" y="520" as="targetPoint" /> </mxGeometry> </mxCell> - <mxCell id="phJliGzTQF7XW9zZiR-q-22" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;startArrow=oval;startFill=1;jumpStyle=arc;" parent="ZdTqr67gGV_Two7x-mBu-1" edge="1"> + <mxCell id="w11Yu14kjo9wnOEZIBzt-11" value="$$\text{results}$$" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;fillColor=#d5e8d4;strokeColor=#82b366;fontFamily=Courier New;" vertex="1" parent="bshJnAdmZ42-ucYETjzj-1"> + <mxGeometry x="415" y="520" width="80" height="40" as="geometry" /> + </mxCell> + <mxCell id="MAhqL2grAOHlyQJotUcC-2" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;" edge="1" parent="bshJnAdmZ42-ucYETjzj-1" source="bshJnAdmZ42-ucYETjzj-41"> <mxGeometry relative="1" as="geometry"> - <mxPoint x="480" y="120" as="sourcePoint" /> - <mxPoint x="200" y="160" as="targetPoint" /> - <Array as="points"> - <mxPoint x="320" y="120" /> - <mxPoint x="200" y="120" /> - </Array> + <mxPoint x="175" y="330" as="targetPoint" /> </mxGeometry> </mxCell> - <mxCell id="phJliGzTQF7XW9zZiR-q-23" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;startArrow=none;startFill=0;" parent="ZdTqr67gGV_Two7x-mBu-1" target="phJliGzTQF7XW9zZiR-q-10" edge="1"> + <mxCell id="MAhqL2grAOHlyQJotUcC-4" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="bshJnAdmZ42-ucYETjzj-1" source="MAhqL2grAOHlyQJotUcC-0"> <mxGeometry relative="1" as="geometry"> - <mxPoint x="480" y="80" as="sourcePoint" /> - <mxPoint x="480" y="180" as="targetPoint" /> - <Array as="points"> - <mxPoint x="480" y="160" /> - <mxPoint x="720" y="160" /> - </Array> + <mxPoint x="260" y="330" as="targetPoint" /> </mxGeometry> </mxCell> - <mxCell id="phJliGzTQF7XW9zZiR-q-28" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" parent="ZdTqr67gGV_Two7x-mBu-1" edge="1"> - <mxGeometry relative="1" as="geometry"> - <mxPoint x="979.75" y="120" as="sourcePoint" /> - <mxPoint x="979.75" y="320" as="targetPoint" /> - </mxGeometry> + <mxCell id="MAhqL2grAOHlyQJotUcC-0" value="<div>$$scalarMul()$$</div>" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;fillColor=#fff2cc;strokeColor=#d6b656;fontFamily=Courier New;" vertex="1" parent="bshJnAdmZ42-ucYETjzj-1"> + <mxGeometry x="220" y="200" width="80" height="40" as="geometry" /> </mxCell> - <mxCell id="phJliGzTQF7XW9zZiR-q-29" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" parent="ZdTqr67gGV_Two7x-mBu-1" edge="1"> + <mxCell id="MAhqL2grAOHlyQJotUcC-5" value="<div>$$isEqual()$$</div>" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;fillColor=#fff2cc;strokeColor=#d6b656;fontFamily=Courier New;" vertex="1" parent="bshJnAdmZ42-ucYETjzj-1"> + <mxGeometry x="150" y="330" width="130" height="40" as="geometry" /> + </mxCell> + <mxCell id="MAhqL2grAOHlyQJotUcC-6" value="true" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;fontFamily=Courier New;strokeColor=none;" vertex="1" parent="bshJnAdmZ42-ucYETjzj-1"> + <mxGeometry x="175" y="520" width="80" height="40" as="geometry" /> + </mxCell> + <mxCell id="MAhqL2grAOHlyQJotUcC-7" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;exitX=0.5;exitY=1;exitDx=0;exitDy=0;" edge="1" parent="bshJnAdmZ42-ucYETjzj-1" target="MAhqL2grAOHlyQJotUcC-6" source="MAhqL2grAOHlyQJotUcC-5"> <mxGeometry relative="1" as="geometry"> - <mxPoint x="1079.75" y="120" as="sourcePoint" /> - <mxPoint x="1079.75" y="320" as="targetPoint" /> + <mxPoint x="220" y="370" as="sourcePoint" /> + <mxPoint x="220" y="400" as="targetPoint" /> </mxGeometry> </mxCell> - <mxCell id="xnlEkFcDW3wDAF-mUqor-0" value="true" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;fontFamily=Courier New;strokeColor=none;" parent="ZdTqr67gGV_Two7x-mBu-1" vertex="1"> - <mxGeometry x="20" y="360" width="80" height="40" as="geometry" /> - </mxCell> - <mxCell id="IpKGK8iQcOz9ALTK2j-a-0" value="$$ReEnc()$$" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;fillColor=#ffe6cc;strokeColor=#d79b00;fontFamily=Courier New;" parent="ZdTqr67gGV_Two7x-mBu-1" vertex="1"> - <mxGeometry x="890" y="200" width="80" height="40" as="geometry" /> + <mxCell id="MAhqL2grAOHlyQJotUcC-8" value="RESULTS CALCULATION" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontFamily=Courier New;fillColor=#dae8fc;strokeColor=#6c8ebf;fontSize=11;" vertex="1" parent="bshJnAdmZ42-ucYETjzj-1"> + <mxGeometry x="344" y="627.1800000000001" width="390" height="40" as="geometry" /> </mxCell> - <mxCell id="IpKGK8iQcOz9ALTK2j-a-1" value="Old votes also need to be reencrypted! (at least, some)" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;fillColor=#ffe6cc;strokeColor=#d79b00;fontFamily=Courier New;" parent="ZdTqr67gGV_Two7x-mBu-1" vertex="1"> - <mxGeometry x="710" y="250" width="400" height="20" as="geometry" /> + <mxCell id="MAhqL2grAOHlyQJotUcC-9" value="" style="strokeWidth=1;html=1;shape=mxgraph.flowchart.annotation_2;align=left;labelPosition=right;pointerEvents=1;rotation=-90;" vertex="1" parent="bshJnAdmZ42-ucYETjzj-1"> + <mxGeometry x="529.06" y="408.13" width="20" height="398.75" as="geometry" /> </mxCell> </root> </mxGraphModel>
@@ -0,0 +1,14 @@
+# List of useful resources + +- Protocol + - [Original HackMD whitepaper](https://hackmd.io/@vocdoni/BJY8EXQy1x) + - [Notation discussion](https://docs.google.com/spreadsheets/d/1A-arG7G3Pv4CBFwLz3vFh-wNlWkzHDNxvV_CdF6noAI/edit?gid=0#gid=0) + - [Definition of voting properties](https://docs.google.com/document/d/1dwUfj9c7EqJJa683P0tUCmQrMMYd-pZ9ZDT3JdwdGMA/edit?tab=t.0) +- Circuits + - [Original HackMD description](https://hackmd.io/@vocdoni/BkUgcnSQkx) +- Ballot protocol + - [Table with examples](https://docs.google.com/spreadsheets/d/18Ge6rIOHL36TP4dzeKsr0leDIm39WgV4rOGxoC92Bdo) +- Data blobs + - [ZK rollups after EIP4844](https://docs.sotazk.org/docs/zk_rollups_after_eip4844) + - [Vocdoni Github PR description](https://github.com/vocdoni/davinci-node/pull/177) + - [Vocdoni circuit](https://github.com/vocdoni/davinci-node/blob/main/crypto/blobs/circuit.go)
@@ -1,54 +1,47 @@
% !TeX root = ../build/main.tex -The \davinci protocol builds on several decentralized technologies and advanced cryptographic tools. In this section we give a high-level overview of these components and their role in the system. We first introduce the interplanetary file system (IPFS), which serves as a decentralized storage layer for distributing large datasets off-chain. We then describe Ethereum, the settlement layer where commitments are published, rules are enforced through smart contracts, and state data is managed using recent mechanisms such as data blobs. Finally, we present the zero-knowledge (ZK) proof systems that underpin the protocol’s integrity and security, focusing on ZK-SNARKs and arithmetic circuits, which allow participants to prove compliance with protocol rules without revealing sensitive information. - -%The \davinci protocol builds on several decentralized technologies and cryptographic primitives: IPFS for off-chain data distribution, Ethereum for settlement and smart contract execution (including recent extensions such as data blobs), and ZK proofs, specifically ZK-SNARKs over arithmetic circuits, for verifiable yet privacy-preserving enforcement of protocol rules. In this section we give a high-level overview of these components +The \davinci protocol builds on several decentralized technologies and advanced cryptographic tools. In this section, we give a high-level overview of these components and their role in the system. We first introduce the \ac{IPFS}, which serves as a decentralized storage layer for distributing large datasets off-chain. We then describe Ethereum, the settlement layer where commitments are published, rules are enforced through smart contracts, and state data is managed using recent mechanisms such as data blobs. Finally, we present the \ac{ZK} proof systems that underpin the protocol’s integrity and security, focusing on \acp{ZK-SNARK} and arithmetic circuits, which allow participants to prove compliance with protocol rules without revealing sensitive information. \subsection{Interplanetary file system} \label{sec:background:ipfs} -The interplanetary file system (IPFS) is a peer-to-peer distributed storage network designed to make the web more resilient, permanent, and decentralized. Unlike traditional client-server architectures that retrieve data from a specific location (e.g., a URL pointing to a server), IPFS retrieves data based on its content. Every file stored in IPFS is split into blocks, each block is hashed, and the resulting cryptographic hash is used as its unique identifier. This property, known as content addressing, ensures that data is tamper-evident: if the file changes, so does its hash. -% -IPFS also provides deduplication (the same content is only stored once across the network), versioning (content identifiers can point to immutable snapshots of data), and distributed availability (data can be fetched from any node that stores it). Together, these features allow IPFS to function as a decentralized content delivery network. +The \acf{IPFS} is a peer-to-peer distributed storage network designed to make the web more resilient, permanent, and decentralized. Unlike traditional client-server architectures that retrieve data from a specific location (e.g., a URL pointing to a server), \ac{IPFS} retrieves data based on its content. Every file stored in \ac{IPFS} is split into blocks, each block is hashed, and the resulting cryptographic hash is used as its unique identifier. This property, known as content addressing, ensures that data is tamper-evident: if the file changes, so does its hash. +\ac{IPFS} also provides deduplication (the same content is only stored once across the network), versioning (content identifiers can point to immutable snapshots of data), and distributed availability (data can be fetched from any node that stores it)\roger{doesn't this clash with deduplication?}. Together, these features allow IPFS to function as a decentralized content delivery network. -In the context of the \davinci voting protocol, IPFS is particularly useful for off-chain data distribution. Large datasets such as the full census (eligible voters and their weights) or intermediate state updates of the voting process do not need to be stored directly on Ethereum. Instead, they are stored in IPFS, and only their content hashes are published on-chain. This approach ensures transparency and verifiability—anyone can fetch the dataset from IPFS and recompute the hash to confirm its integrity—while keeping on-chain storage costs low. Sequencers and voters can therefore rely on IPFS to access the data required for generating and verifying Merkle proofs, without burdening the blockchain with large amounts of data. +In the context of the \davinci voting protocol, \ac{IPFS} is particularly useful for off-chain data distribution\pau{Mencionar IPFS està bé, es una peça important. Però potser caldria especificar que no es part del protocol. Que es una cosa de l'implementació i que en qualsevol moment es pot canviar a un altre storage layer.}. Large datasets such as the full census (eligible voters and their weights) and election metadata (which may include questions, options, images, etc.) do not need to be stored directly on Ethereum. Instead, they are stored in \ac{IPFS}, and only their content hashes are published on-chain. This approach ensures transparency and verifiability—anyone can fetch the dataset from \ac{IPFS} and recompute the hash to confirm its integrity—while keeping on-chain storage costs low. Sequencers\pau{We mention Sequencers here but they have not yet been introduced.} and voters can therefore rely on \ac{IPFS} to access the data required for generating and verifying Merkle proofs, without burdening the blockchain with large amounts of data. \subsection{Ethereum} \label{sec:background:ethereum} -Ethereum is a decentralized blockchain platform that supports programmable transactions through its built-in execution environment, the Ethereum Virtual Machine (EVM). All interactions with the Ethereum network take the form of transactions, which must be broadcast to the network, validated by consensus, and permanently recorded on-chain. Every transaction requires the payment of a fee (gas), denominated in ETH, to compensate validators for computation and storage. This fee model ensures that resources are used efficiently and prevents denial-of-service attacks by making large or complex operations costly. In the context of \davinci, Ethereum serves as the settlement layer where critical commitments are published, ensuring transparency and immutability. +Ethereum is a decentralized blockchain platform that supports programmable transactions through its built-in execution environment, the \acf{EVM}. All interactions with the Ethereum network take the form of transactions, which must be broadcast to the network, validated by consensus, and permanently recorded on-chain. Every transaction requires the payment of a fee (gas), denominated in ETH, to compensate validators for computation and storage. This fee model ensures that resources are used efficiently and prevents denial-of-service attacks by making large or complex operations costly. In the context of \davinci, Ethereum serves as the settlement layer where critical commitments are published, ensuring transparency and immutability. \paragraph{Smart contracts.} Smart contracts are programs deployed on the Ethereum blockchain that execute deterministically in response to transactions. Once deployed, they cannot be altered, and their execution is guaranteed by the consensus of the network. In \davinci, smart contracts orchestrate the voting process by managing state transitions and storing critical data such as the current state root and the encryption public key. They enforce the protocol rules in a trustless environment, ensuring that no single participant can manipulate the process. By anchoring these rules in Ethereum smart contracts, \davinci guarantees that the election logic is applied consistently and verifiably across all participants. -% Original text: Ethereum smart contracts are employed to orchestrate the voting process, manage state transitions, and store critical data, such as the current state root and encryption public keys. These smart contracts provide a trustless environment, ensuring that all participants can be confident that the voting process rules are correctly enforced. - -\paragraph{Data blobs.} Data availability is a key requirement for decentralized protocols. Ethereum’s recent EIP-4844 introduces data blobs as a mechanism for publishing large volumes of off-chain data alongside transactions at a lower cost than traditional storage. These blobs are not permanently stored on-chain, but they are guaranteed to remain available for a sufficient period of time for verification. In \davinci, sequencers use data blobs to share state transition data efficiently. By publishing state updates in blobs, sequencers allow other participants to reconstruct and verify the evolution of the voting process without overloading Ethereum’s permanent storage. This ensures scalable, decentralized data availability while retaining verifiability. - -% Original text: EIP-4844 is used for data availability, enabling the storage of state transition data in the form of Ethereum data blobs. This mechanism allows sequencers to collaborate on the construction and verification of the voting process state, ensuring efficient and decentralized data availability. +\paragraph{Data blobs.} Data availability is a key requirement for decentralized protocols. Ethereum’s recent EIP-4844~\cite{eip4844} introduces data blobs as a mechanism for publishing large volumes of off-chain data alongside transactions at a lower cost than traditional storage. These blobs are kept on-chain for 4096 epochs, approximately 18 days, after which they are pruned. For longer election periods, third-party solutions based on EIP-4844 can be used to extend data availability\cite{}. In \davinci, sequencers use data blobs to share state transition data efficiently. By publishing state updates in blobs, sequencers allow other participants to reconstruct and verify the evolution of the voting process without overloading Ethereum’s permanent storage. This ensures scalable, decentralized data availability while retaining verifiability. \subsection{Zero-knowledge proofs} \label{sec:background:zkp} Zero-knowledge (ZK) proofs are cryptographic protocols that allow one party (the prover) to convince another (the verifier) that a certain statement is true, without revealing any information beyond the validity of the statement itself. In the context of voting, this enables participants to prove that their encrypted ballot is well-formed and complies with the election rules, without disclosing their actual choice. -\paragraph{ZK-SNARKs.} -We focus on a specific type of proof systems called zero-knowledge succinct non-interactive arguments of knowledge (ZK-SNARKs). +\paragraph{\Acp{ZK-SNARK}.} +We focus on a specific type of proof system called zero-knowledge succinct non-interactive arguments of knowledge (\acsp{ZK-SNARK}). %, which are particularly suited for blockchain settings. -Informally, while a ZK proof convinces the verifier that a valid witness exists, an argument of knowledge additionally ensures that the prover actually knows such a witness, except with negligible probability. ZK-SNARKs extend this notion with two crucial properties: they are non-interactive, requiring only a single message from prover to verifier, and succinct, meaning that proof size and verification cost remain small regardless of the size of the underlying statement. For instance, Groth16 proofs~\cite{groth2016size}, which rely on pairing-based cryptography over elliptic curves, %to achieve short proofs and fast verification [Gro16, GWC19]. -are only about 200 bytes long and can be verified in a few milliseconds. These properties make ZK-SNARKs particularly well-suited for blockchain applications, where verification cost and data size are critical. In \davinci, ZK-SNARKs are used at multiple stages of the protocol: voters generate proofs to show that their encrypted ballots are correct and sequencers use recursive ZK-SNARKs allow multiple proofs to be aggregated efficiently and generate proofs to attest to valid state transitions. In essence, ZK-SNARKs enable both voters and sequencers to produce compact proofs that can be checked on-chain, ensuring that all protocol rules are followed without requiring trust in any party. +Informally, while a \ac{ZK} proof convinces the verifier that a valid witness exists, an argument of knowledge additionally ensures that the prover actually knows such a witness, except with negligible probability. \acsp{ZK-SNARK} extend this notion with two crucial properties: they are non-interactive, requiring only a single message from prover to verifier, and succinct, meaning that proof size and verification cost remain small regardless of the size of the underlying statement. For instance, Groth16 proofs~\cite{groth2016size}, which rely on pairing-based cryptography over elliptic curves, %to achieve short proofs and fast verification [Gro16, GWC19]. +are only about 200 bytes long and can be verified in a few milliseconds. These properties make \acsp{ZK-SNARK} particularly well-suited for blockchain applications, where verification cost and data size are critical. In \davinci, \acsp{ZK-SNARK} are used at multiple stages of the protocol: voters generate proofs to show that their encrypted ballots are correct and sequencers use recursive \acsp{ZK-SNARK} to allow multiple proofs to be aggregated efficiently and generate proofs to attest to valid state transitions. In essence, \acsp{ZK-SNARK} enable both voters and sequencers to produce compact proofs that can be checked on-chain, ensuring that all protocol rules are followed without requiring trust in any party. \paragraph{Trusted setup.} -A limitation of some ZK-SNARK protocols is their reliance on a common reference string (CRS) generated during a so-called trusted setup. The CRS is built from random values that must not be known to either the prover or the verifier. To achieve this, the CRS can be created by a trusted third party or, more robustly, via a secure multi-party computation (MPC) protocol [Can01]. In an MPC setup, it suffices that at least one participant discards their secret contribution to ensure the integrity of the whole ceremony. {\color{blue}For \davinci, we run an MPC for each of the circuits, see Sections~\ref{sec:cryptographic-primitives:zkp} and~\ref{sec:analysis:implementation}.} +A limitation of some \ac{ZK-SNARK} protocols is their reliance on a \ac{CRS} generated during a so-called trusted setup. The \ac{CRS} is built from random values that must not be known to either the prover or the verifier. To achieve this, the \ac{CRS} can be created by a trusted third party or, more robustly, via a secure \ac{MPC} protocol \cite{canetti2001universally}. In an MPC setup, it suffices that at least one participant discards their secret contribution to ensure the integrity of the whole ceremony. {\color{blue}For \davinci, we run an \ac{MPC} for each of the circuits, see Sections~\ref{sec:cryptographic-primitives:zkp} and~\ref{sec:analysis:implementation}.} % By anchoring these proofs on Ethereum, the protocol ensures that every step of the voting process is publicly verifiable, while preserving voter privacy. %In general, zk-SNARKs for circuit satisfiability (CSAT) require arithmetic circuits to be expressed in a more algebraic form. A common representation is the rank-1 constraint system (R1CS) [GGPR13], which encodes computations as a set of quadratic constraints. A zk-SNARK proof then demonstrates, without revealing any private values, that the prover knows an assignment to all wires of the circuit that satisfies the R1CS. Tooling such as circom provides a high-level language to write arithmetic circuits while still exposing full control over the signals and constraints of the resulting R1CS. -\paragraph{Arithmetic circuits.} In general, ZK-SNARKs operate by proving the satisfiability of an arithmetic circuit. -An arithmetic circuit (from now on also called circuit or ZK circuit) is a directed acyclic graph where nodes represent addition or multiplication gates over a finite field. The inputs and outputs of the circuit correspond to the public inputs and private witnesses of the computation, while the intermediate wires carry intermediate values. Any deterministic computation, from verifying an encryption to checking Merkle proofs, can be compiled into an arithmetic circuit. +\paragraph{Arithmetic circuits.} In general, \acsp{ZK-SNARK} operate by proving the satisfiability of an arithmetic circuit. +An arithmetic circuit (from now on also called circuit or \ac{ZK} circuit) is a directed acyclic graph where nodes represent addition or multiplication gates over a finite field. The inputs and outputs of the circuit correspond to the public inputs and private witnesses of the computation, while the intermediate wires carry intermediate values. Any deterministic computation, from verifying an encryption to checking Merkle proofs, can be compiled into an arithmetic circuit \cite{todocitation}. %The most widely studied language in the context of ZK-SNARK proofs is the NP-complete language of circuit satisfiability [BCC+ 16, PHGR13, BSCTV14b]. %zk-SNARKs prove statements about the satisfiability of arithmetic circuits. An arithmetic circuit is a directed acyclic graph consisting of addition and multiplication gates defined over a finite field. Such circuits are a convenient model for computation: any program or verification logic can be compiled into an arithmetic circuit, with its inputs, outputs, and intermediate constraints expressed as field operations. -In practice, proving with ZK-SNARKs means showing knowledge of a secret witness (e.g., a plaintext ballot or encryption randomness) that satisfies all the equations encoded in the circuit. For example, the ballot circuit in \davinci encodes the constraints that a ciphertext is well-formed, that the vote identifier is correctly derived, and that the ballot complies with the rules of the voting mode. The prover generates a proof of satisfiability, while the verifier only checks the proof against the public inputs, without learning the secret witness. -By building complex protocol logic from arithmetic circuits, and using ZK-SNARKs to prove their satisfiability, \davinci ensures that every step of the election process, from ballot submission to state transitions, is enforced cryptographically and publicly verifiable. % is verifiable in zero-knowledge. +In practice, proving with \acsp{ZK-SNARK} means showing knowledge of a secret witness (e.g., a plaintext ballot or encryption randomness) that satisfies all the equations encoded in the circuit. For example, the ballot circuit in \davinci encodes the constraints that a ciphertext is well-formed, that the vote identifier is correctly derived, and that the ballot complies with the rules of the voting mode. The prover generates a proof of satisfiability, while the verifier only checks the proof against the public inputs, without learning the secret witness. +By building complex protocol logic from arithmetic circuits, and using \acsp{ZK-SNARK} to prove their satisfiability, \davinci ensures that every step of the election process, from ballot submission to state transitions, is enforced cryptographically and publicly verifiable. % is verifiable in zero-knowledge. %In \davinci, arithmetic circuits form the backbone of all zk-SNARK proofs: voters use them to generate ballot proofs, sequencers use them to prove state transitions, and aggregation circuits recursively combine multiple proofs. Together, these circuits ensure that every step of the protocol is enforced cryptographically and can be verified succinctly on-chain.
@@ -1,100 +0,0 @@
-% !TeX root = ../build/main.tex - -\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. - -The responses in the ballot are represented as a sequence of natural numbers, each corresponding to the voter’s choice for the respective field. Results are accumulated into a single array. Each position in the array corresponds to the sum of all votes cast for that field across all voters. - -The ballot protocol is defined by a set of configurable variables that dictate how votes must be cast. This way the protocol can accommodate a wide range of voting processes and behaviors. The list of variables is the following. - -\begin{enumerate} - \item \maxcount: it defines the maximum number of fields in a ballot (max 64). - \item \maxvalue: it is the maximum allowable value for any field in a ballot (if greater than 0). - \item \minvalue: it is the minimum allowable value for any field in a ballot (default 0). - \item \uniquevalues: it specifies whether voters can select the same value multiple times within a ballot (default false). - \item \maxtotalcost: it limits the sum of all field values in a ballot (if greater than 0). - \item \mintotalcost: it specifies a minimum required total sum of field values in a ballot (default 0) - \item \costexponent: it defines the exponent used to calculate the "cost" of votes for each field (default 1). -\end{enumerate} - -\martai{"if greater than 0" vs. "default" (make it consistent).} - -\begin{figure}[H] - \centering - \fbox{ - \includegraphics[scale = 0.4, draft = false]{\figs/ballot-variables.png}} -\end{figure} - -\martai{In Figure: when is says uniqueValues: x, y, z must be different -- this is if uniqueValues = false, right?} - -\paragraph{Example 1: Rating candidates.} - -\martai{Reorder names Lennon, Hendrix, Joplin alphabetically.} -\martai{In this example, the rest of variables are default, right? E.g. minValue = 0?} - -Consider a voting process where voters are asked to rate three candidates: Lennon, Hendrix, and Joplin. Voters rate each candidate from 0 to 5 stars, and each vote is represented as an array where each position corresponds to the candidate’s rating. The configuration of this voting would be the following: - -\begin{itemize} - \item \maxcount: 3 - \item \maxvalue: 5 - \item \uniquevalues: Yes -\end{itemize} - -Ballots: - -\begin{itemize} - \item Vote 1: \texttt{[3, 2, 5]} (3 stars for Lennon, 2 stars for Hendrix, 5 stars for Joplin) - \item Vote 2: \texttt{[4, 3, 2]} - \item Vote 3: \texttt{[2, 4, 5]} -\end{itemize} - -\martai{I would write 4 ballots.} - -After accumulating the votes: - -\begin{itemize} - \item Results Array: \texttt{[3+4+2, 2+3+4, 5+2+5] = [9, 9, 12]}\\ - Lennon received 9 points, Hendrix received 9 points, and Joplin received 12 points. -\end{itemize} - -\martai{In the above example, there is no limit to maxTotalCost, right? Maybe add something like, if maxTotalcost = X, then one of the previous ballots would be invalid (and explain why).} - -\paragraph{Example 2: Quadratic voting for resource allocation.} - -In a scenario where voters distribute a fixed number of credits across different options (e.g., selecting funding levels for NGOs), the ballot allows voters to assign multiple points, but the cost of casting multiple votes for a single option increases quadratically. - -Configuration: - -\begin{itemize} - \item \maxcount: 4 - \item \maxtotalcost: 12 (credits) - \item \costexponent: 2 (quadratic) -\end{itemize} - -Ballots: - -\begin{itemize} - \item Vote 1: \texttt{[2, 2, 2, 0]} - \item Vote 2: \texttt{[1, 1, 3, 1]} - \item Vote 3: \texttt{[0, 2, 1, 2]} -\end{itemize} - -\martai{Add a fourth vote, e.g. [3, 3, 0, 0]. Then mention that the first 3 ballots are ok because $2^2 + 2^2 + 2^2 = 12$, $1^2 + 1^1 + 3^2 + 1^2 = 12$, $2^2 + 1 + 2^2 = 9 < 12$, but $3^2 + 3^2 = 18 > 12$, and therefore it's invalid. Did I get this right?} - - -After accumulating the votes: - - -\begin{itemize} - \item Results Array: \texttt{[2+1+0, 2+1+2, 2+3+1, 0+1+2] = [3, 5, 6, 3]} \\ - Each position in the array represents the total sum of credits allocated to each NGO. -\end{itemize} - -\martai{Cost may be dependant on the voter's weight.}
@@ -9,7 +9,7 @@ \begin{itemize}
\item \numfields: the maximum number of fields (i.e., options) in the ballot. \item \minvalue: the minimum value that each field in the ballot can take. \item \maxvalue: the maximum value that each field in the ballot can take. - \item \uniquevalues: a Boolean flag indicating whether all field values must be distinct (as in ranking systems). + \item \uniquevalues: a Boolean flag indicating whether all field values must be different (as in ranking systems). \item \costexponent: the exponent applied when computing the cost of casting votes in a field. This parameter enables quadratic or higher-order voting rules. \item \minvaluesum: the minimum allowed total sum of a ballot, computed as $\sum_{i=1}^{\numfields} v_i^{\costexponent}$, where $v_i$ are the field values.@@ -31,6 +31,15 @@ \caption{Schematic representation of the parameters that define a ballot in \davinci.}
\label{fig:ballot-variables} \end{figure} \vspace{-1cm} + +\paragraph{(Ballot mode) circuit constraints.} Given a ballot with $n$ fields and each field filled with a value $v_i$ for $i = 1, \dots, n$, we enforce the following constraints (captured in Figure~\ref{fig:ballot-variables}): + +\begin{itemize} + \item $\numfields = n$, + \item If $\uniquevalues = \true$, then $v_i \neq v_j$ for all $i\neq j$. + \item $\minvalue \leq v_i \leq \maxvalue$ for all $i\in\{1, \dots, n\}$. + \item $\minvaluesum \leq \sum_{i=1}^n v_i^{\costexponent} \leq \maxvaluesum$. +\end{itemize} \paragraph{General mechanism.} A ballot is valid if and only if all the above constraints are satisfied. Invalid ballots are rejected at the circuit level and do not contribute to the tally. Valid ballots are aggregated into a results array, where each entry is the sum of all votes cast for the corresponding field across all voters. Voter weights, defined in the census tree (see Section~\ref{sec:vocdoni-protocol:merkle-trees:census}), are taken into account when computing these sums. By default, all voters have the same weight, but the protocol also supports weighted voting, where different participants may contribute proportionally to their assigned voting power. In this case, \maxvaluesum\ reflects the maximum weight assigned to each voter, and the ballot and verifier circuits enforce that the correct weight is being used (see Sections~\ref{sec:vocdoni-protocol:circuits:ballot} and~\ref{sec:vocdoni-protocol:circuits:verifier} for further details).
@@ -1,6 +1,8 @@
% !TeX root = ../build/main.tex -At the core of \davinci lie a set of arithmetic circuits that enforce the correctness of every step of the voting process. Each circuit corresponds to a distinct task and, taken together, they guarantee that all protocol rules are satisfied without revealing any private information. Specifically, the \emph{ballot circuit} (Section~\ref{sec:vocdoni-protocol:circuits:ballot}) ensures that encrypted votes are valid and well-formed, the \emph{verifier circuit} (Section~\ref{sec:vocdoni-protocol:circuits:verifier}) verifies voter eligibility and census membership; the \emph{aggregation circuit} (Section~\ref{sec:vocdoni-protocol:circuits:aggregation}) combines multiple authenticated votes into a single proof; and the \emph{state transition circuit} (Section~\ref{sec:vocdoni-protocol:circuits:state-transition}) updates the global state root and produces the ZK-SNARK proof that is verified on-chain. The flow of these circuits and their interactions is shown in Figure~\ref{fig:circuits-flow}. +\rogeri{consider using paragraph as in S5.3 "Smart contracts" for readability} + +At the core of \davinci lie a set of arithmetic circuits that enforce the correctness of every step of the voting process. Each circuit corresponds to a distinct task and, taken together, they guarantee that all protocol rules are satisfied without revealing any private information. Specifically, the \emph{ballot circuit} (Section~\ref{sec:vocdoni-protocol:circuits:ballot}) ensures that encrypted votes are valid and well-formed, the \emph{verifier circuit} (Section~\ref{sec:vocdoni-protocol:circuits:verifier}) verifies the voter's census membership; the \emph{aggregation circuit} (Section~\ref{sec:vocdoni-protocol:circuits:aggregation}) combines multiple authenticated votes into a single proof; and the \emph{state transition circuit} (Section~\ref{sec:vocdoni-protocol:circuits:state-transition}) updates the global state root and produces the \ac{ZK-SNARK} proof that is verified on-chain. The flow of these circuits and their interactions is shown in Figure~\ref{fig:circuits-flow}. \begin{figure}[h] \centerline{\includegraphics[width=\linewidth,draft=false]{\figs/circuits-flow-v2}}@@ -9,21 +11,21 @@ Overview of the circuit flow in \davinci.}
\label{fig:circuits-flow} \end{figure} -For clarity, the circuits are described in this section with their full set of public inputs explicitly listed. In the actual implementation, however, we apply an optimization: rather than exposing all public inputs individually, we compute a single commitment $h = Hash(PI)$ and use $h$ as the only public input. The proof verifier then checks that $Hash(PI) = h$, ensuring that the original public inputs are consistent while reducing both proof size and verification cost. In \davinci, this commitment is computed using the MiMC-7 hash function {\color{blue}(use hlget to point "Hash" to MiMC-7)}. Note that this optimization does not alter the semantics of the circuits but significantly reduces verifier complexity and on-chain verification costs. Other implementation aspects such as the exact number of constraints and the proving frameworks used are deferred to Section~\ref{sec:analysis:implementation}. +For clarity, the circuits are described in this section with their full set of public inputs explicitly listed. In the actual implementation, however, we apply an optimization: rather than exposing all public inputs $PI$ individually, we compute a single commitment $h = Hash(PI)$ and use $h$ as the only public input. The proof verifier then checks that $Hash(PI) = h$, ensuring that the original public inputs are consistent while reducing both proof size and verification cost. In \davinci, this commitment is computed using the MiMC-7 hash function {\color{blue}(use hlget to point "Hash" to MiMC-7)}. Note that this optimization does not alter the semantics of the circuits but significantly reduces verifier complexity and on-chain verification costs. Other implementation aspects such as the exact number of constraints and the proving frameworks used are deferred to Section~\ref{sec:analysis:implementation}. % 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. \subsubsection{Ballot circuit} \label{sec:vocdoni-protocol:circuits:ballot} -The ballot circuit, illustrated in Figure~\ref{fig:circuit-ballot}, is generated locally by the voter at the time of casting a ballot. Its purpose is twofold: first, to prove that the encrypted ballot is valid and complies with the protocol rules defined by the organizer; and second, to prove that the vote identifier (\voteid) has been correctly derived. The correctness of this circuit is attested by a ZK proof generated using the ZK-SNARK protocol described in Section~\ref{sec:cryptographic-primitives:zkp}, instantiated over the BN254 curve. We call the resulting proof \textit{ballot proof} and denote it as $\hlset{\ballotproof}$. We detail below the inputs and constraints of the ballot circuit. +The ballot circuit, illustrated in Figure~\ref{fig:circuit-ballot}, is generated locally by the voter at the time of casting a ballot. Its purpose is twofold: first, to prove that the encrypted ballot is valid and complies with the protocol rules defined by the organizer; and second, to prove that the vote identifier (\voteid) has been correctly derived. The correctness of this circuit is attested by a \ac{ZK} proof generated using the \ac{ZK-SNARK} protocol described in Section~\ref{sec:cryptographic-primitives:zkp}, instantiated over the BN254 curve. We call the resulting proof \textit{ballot proof} and denote it as $\hlset{\ballotproof}$. We detail below the inputs and constraints of the ballot circuit. \begin{spacing}{1.25} \vspace{0.3cm} \noi \textbf{Public inputs} \begin{itemize} \item $\public$ $\processid$: voting process identifier. - \item $\public$ $\ballotmode$: ballot protocol configuration.S + \item $\public$ $\ballotmode$: ballot protocol configuration. \item $\public$ $\epk$ ($EPK$): encryption public key. \item $\public$ $\address$: voter's address. \item $\public$ $\weight$: voter's weight.@@ -76,12 +78,12 @@ \item \private $\signature$: voter's signature.
\end{itemize} \textbf{Constraints} \begin{itemize} - \item \emph{Voter's proof verification.} The vote zkProof is valid for the inputs provided: - $$\hlget{\PVerify}\left(\ballotproof, PI = (\processid, \ballotmode, \epk, (C_1, C_2), \voteid, \weight)\right).$$ + \item \emph{Voter's proof verification.} The voter's submitted proof is valid for the inputs provided: + $$\hlget{\PVerify}\left(\ballotproof, PI = (\processid, \ballotmode, \epk, (C_1, C_2), \voteid, \weight)\right) = \true.$$ \item \emph{Census membership.} The address derived from the user's public key is part of the census, and verifies the census proof with the user's weight provided: - $$ \hlget{\censusTree}.\hlget{\MTMembershipProof}(\weight, \address = \hlget{\Keccak}(\pk), \censuspf, \censusroot). $$ + $$ \hlget{\censusTree}.\hlget{\MTVerify}\left(\weight, \address = \hlget{\Keccak}(\pk), \censuspf, \censusroot\right) = \true. $$ \item \emph{Authentication + non-malleability.} The signature of the vote's identifier is valid for the given public key: - $$ \hlget{\SVer}_{\pk}(\voteid, \signature). $$ + $$ \hlget{\SVer}_{\pk}(\voteid, \signature) = \true. $$ \end{itemize} \vspace{-0.3cm} \end{spacing}@@ -95,7 +97,7 @@
\subsubsection{Aggregation circuit} \label{sec:vocdoni-protocol:circuits:aggregation} -The aggregation circuit, illustrated in Figure~\ref{fig:circuit-aggregate}, is generated by the sequencer to combine multiple authenticated votes into a single proof. Its purpose is to reduce verification overhead by recursively aggregating individual authentication proofs, while ensuring that all aggregated votes belong to the same voting process. The batch size, i.e., the maximum number of proofs aggregated in a single execution, is a fixed parameter (currently set to 60). If fewer proofs are available, the sequencer pads the batch with dummy proofs so that the circuit always operates on a fixed-size input. The correctness of this circuit is attested by a ZK proof generated using the ZK-SNARK protocol described in Section~\ref{sec:cryptographic-primitives:zkp}, instantiated over the BW6-761 curve. We call the resulting proof the \textit{aggregation proof} and denote it as $\hlset{\aggregationproof}$. We detail below the inputs and constraints of the aggregation circuit. +The aggregation circuit, illustrated in Figure~\ref{fig:circuit-aggregate}, is generated by the sequencer to combine multiple authenticated votes into a single proof. Its purpose is to reduce verification overhead by recursively aggregating individual authentication proofs, while ensuring that all aggregated votes belong to the same voting process. The batch size, i.e., the maximum number of proofs aggregated in a single execution, is a fixed parameter (currently set to 60). If fewer proofs are available, the sequencer pads the batch with dummy proofs so that the circuit always operates on a fixed-size input. The correctness of this circuit is attested by a ZK proof generated using the \ac{ZK-SNARK} protocol described in Section~\ref{sec:cryptographic-primitives:zkp}, instantiated over the BW6-761 curve. We call the resulting proof the \textit{aggregation proof} and denote it as $\hlset{\aggregationproof}$. We detail below the inputs and constraints of the aggregation circuit. \begin{spacing}{1.25} \vspace{0.3cm}@@ -116,7 +118,7 @@ \end{itemize}
\textbf{Constraints} \\ \vspace{-0.4cm} \begin{itemize} \item \emph{Votes aggregation.} The accumulated authentication proofs are valid (for the given inputs). For every $i$: - $$\hlget{\PVerify}(\authenticationproof, PI = ((C_1, C_2)_i, \voteid_i, \pk_i, \processid, \ballotmode, EPK, \censusroot)).$$ + $$\hlget{\PVerify}\left(\authenticationproof, PI = ((C_1, C_2)_i, \voteid_i, \pk_i, \processid, \ballotmode, EPK, \censusroot)\right) = \true.$$ \item \emph{Shared public inputs.} The public inputs \processid, \ballotmode, \epk, and \censusroot are the same for all proofs. \end{itemize} \vspace{-0.3cm}@@ -131,7 +133,7 @@
\subsubsection{State transition circuit} \label{sec:vocdoni-protocol:circuits:state-transition} -The state transition circuit, illustrated in Figure~\ref{fig:circuit-state-transition-v2}, is generated by the sequencer to update the global state of the voting process. Its purpose is to verify that a batch of aggregated votes has been correctly incorporated into the state Merkle tree, that overwrites and vote identifiers are handled consistently, and that the accumulators of encrypted results are updated accordingly. The correctness of this circuit is attested by a ZK proof generated using the ZK-SNARK protocol described in Section~\ref{sec:cryptographic-primitives:zkp}, instantiated over the BN254 curve, which is supported by Ethereum’s native precompiles for proof verification. We call the resulting proof the \textit{state proof} and denote it as $\hlset{\stateproof}$. This proof is submitted on-chain and verified by the process management smart contract, ensuring that every accepted state transition complies with the protocol rules. +The state transition circuit, illustrated in Figure~\ref{fig:circuit-state-transition-v2}, is generated by the sequencer to update the global state of the voting process. Its purpose is to verify that a batch of aggregated votes has been correctly incorporated into the state Merkle tree, that overwrites and vote identifiers are handled consistently, and that the accumulators of encrypted results are updated accordingly. The correctness of this circuit is attested by a \ac{ZK} proof generated using the \ac{ZK-SNARK} protocol described in Section~\ref{sec:cryptographic-primitives:zkp}, instantiated over the BN254 curve, which is supported by Ethereum’s native precompiles for proof verification. We call the resulting proof the \textit{state proof} and denote it as $\hlset{\stateproof}$. This proof is submitted on-chain and verified by the process management smart contract, ensuring that every accepted state transition complies with the protocol rules. To formalize the setting, let the sequencer collect a batch of $N$ votes ($N<60$), of which $n$ are new submissions and $m = N-n$ are overwrites of previously cast ballots. In the following, we describe the inputs and constraints of the state transition circuit in detail.@@ -211,11 +213,20 @@ \end{itemize}
\vspace{-0.3cm} \end{spacing} +{\color{blue}Mention that an advantage of splitting the circuits of the sequencers in 3 is that if the stateRoot changes in the meantime, the sequencer only needs to rerun the last circuit and not all three of them.}\\ + +\martai{\numvotes and \numoverwrites are part of the smart contract state.} \subsubsection{Results circuit} \label{sec:vocdoni-protocol:circuits:results} {\color{blue}{It needs to be done.}} + +\begin{figure}[h] + \centerline{\includegraphics[width=400pt,draft=false]{\figs/circuit-results}} + \caption{Results circuit. All public values are framed in green.} + \label{fig:circuit-results} +\end{figure} %%% STATE-TRANSITION CIRCUIT \begin{landscape}
@@ -6,7 +6,7 @@ %confidentiality: encryption
%decentralized trust: DKG %verifiability: ZKPs -In this section, we present the cryptographic primitives used in the protocol described in Section~\ref{sec:vocdoni-protocol}. We first introduce elliptic curves as the underlying algebraic setting, and then describe the following building blocks, each tied to a specific role in the system: hash functions and Merkle trees for commitments to structured data; digital signatures for voter authentication; encryption schemes for ballot confidentiality; distributed key generation (DKG) for decentralizing trust in the election keys; and zero-knowledge proofs (zkSNARKs) for verifiability of computations. For each primitive we also specify the concrete choice of parameters used. +In this section, we present the cryptographic primitives used in the protocol described in Section~\ref{sec:vocdoni-protocol}. We first introduce elliptic curves as the underlying algebraic setting, and then describe the following building blocks, each tied to a specific role in the system: hash functions and Merkle trees for commitments to structured data; digital signatures for voter authentication; encryption schemes for ballot confidentiality; distributed key generation (DKG) for decentralizing trust in the election keys; and zero-knowledge proofs (\acp{ZK-SNARK}) for verifiability of computations. For each primitive, we also specify the concrete choice of parameters used. %\paragraph{Notation.} Throughout the document, we use the following conventions. Given a set $S$, we denote sampling an element $x$ uniformly at random from $S$ by $x \sample S$. We denote all bitstrings of arbitrary length by $\{0,1\}^*$. %Any group $\G$ used is of a large prime order, and we assume that the discrete logarithm problem is hard in $\G$. If two elements are denoted by the same letter in upper and lower case, e.g. $a, A$, this often means that $A$ is a public key corresponding to the secret key $a$.@@ -15,7 +15,7 @@
\subsection{Elliptic curves} \label{sec:cryptographic-primitives:elliptic-curves} -\Davinci relies on multiple elliptic curves to ensure interoperability with Ethereum, compatibility with available cryptographic primitives, and efficient in-circuit operations. On the one hand, SECP256K1~\cite{brown10sec} is used because Ethereum public keys are elements of this curve. As \Davinci assumes each voter holds a standard Ethereum address, cryptographic operations such as digital signatures and identity verification rely on SECP256K1 to match the Ethereum ecosystem. On the other hand, BN254~\cite{jancar20bn256} is chosen because it is the curve supported by Ethereum's precompiled contracts for ZK proof verification, which makes it ideal for verifying SNARK proofs on-chain with minimal gas cost. Then, BabyJubjub~\cite{belles21twisted} is used as an inner curve for elliptic curve operations within arithmetic circuits. Finally, BLS12-377~\cite{bowe20zexe} and BW6-761~\cite{elhousni20optimized} are used to enable recursive proof composition. More specifically, BLS12-377 acts as the inner curve for constructing proofs, while BW6-761 serves as the outer curve that verifies those proofs within larger ZK-SNARK circuits. This pairing enables succinct verification and composability of ZK-SNARKs within other ZK-SNARKs, which we use for \davinci’s aggregation and state transition logic. Below, we give the details of these curves. +\Davinci relies on multiple elliptic curves to ensure interoperability with Ethereum, compatibility with available cryptographic primitives, and efficient in-circuit operations. On the one hand, SECP256K1~\cite{brown10sec} is used because Ethereum public keys are elements of this curve. As \Davinci assumes each voter holds a standard Ethereum address, cryptographic operations such as digital signatures and identity verification rely on SECP256K1 to match the Ethereum ecosystem. On the other hand, BN254~\cite{jancar20bn256} is chosen because it is the curve supported by Ethereum's precompiled contracts for ZK proof verification, which makes it the optimal choice for verifying SNARK proofs on-chain with minimal gas cost. Then, BabyJubjub~\cite{belles21twisted} is used as an inner curve for elliptic curve operations within arithmetic circuits. Finally, BLS12-377~\cite{bowe20zexe} and BW6-761~\cite{elhousni20optimized} are used to enable recursive proof composition. More specifically, BLS12-377 acts as the inner curve for constructing proofs, while BW6-761 serves as the outer curve that verifies those proofs within larger ZK-SNARK circuits. This pairing enables succinct verification and composability of ZK-SNARKs within other ZK-SNARKs, which we use for \davinci’s aggregation and state transition logic. Below, we give the details of these curves. \paragraph{Parameters.}@@ -184,6 +184,8 @@
\subsection{Merkle trees} \label{sec:cryptographic-primitives:merkle-trees} +{\color{blue}\textbf{TODO}: Add description of Incremental Merkle trees.}\\ + The \davinci protocol uses sparse Merkle Trees (SMTs) as its primary data structure for maintaining off-chain state. Following the construction in~\cite{baylina19sparse}, these are full binary trees of fixed depth in which each leaf encodes a key-value pair and empty leaves are explicitly represented, allowing for both inclusion and non-inclusion proofs. A key property of SMTs is that the hash of each key determines a unique traversal path from the root to the leaf, regardless of insertion order. When inserting a new key, the tree descends until it encounters either an empty node or a leaf. In case of a path collision, the algorithm splits at the first differing bit, creating intermediate nodes accordingly. %SMTs support efficient membership and non‑membership proofs, enabling a party to prove that a given key-value is (or is not) present in the tree without revealing the content.@@ -318,9 +320,9 @@
\subsection{Key generation schemes} \label{sec:cryptographic-primitives:dkg} -To ensure that no single entity controls the decryption key, DAVINCI employs a distributed key generation (DKG) protocol to jointly derive the ElGamal encryption key pair used for ballots encryption~\cite{}. Sequencers who participate in the DKG ceremony are each identified by a unique index $i$. The outcome is a collective public key (\epk) that is published on-chain and used by voters to encrypt their ballots, while the corresponding private key is secret-shared among the sequencers. Only a threshold number $t$ out of $n$ sequencers can later collaborate to decrypt the tally. Unlike classical DKG protocols where shares are exchanged in the clear, our construction uses encrypted shares and ZK-SNARK proofs of correctness. This allows the Ethereum smart contract to verify compliance without learning any of the underlying secrets, ensuring both security and verifiability in a fully decentralized setting. +To ensure that no single entity controls the decryption key, DAVINCI employs a distributed key generation (DKG) protocol to jointly derive the ElGamal encryption key pair used for ballots encryption~\cite{todocitaton}. Participants who contribute to the DKG ceremony are called \emph{\keywardens}, and they are each identified by a unique index~$i$. The outcome is a collective public key (\epk) that is published on-chain and used by voters to encrypt their ballots, while the corresponding private key is secret-shared among the \keywardens. Only a threshold number $t$ out of $n$ \keywardens can later collaborate to decrypt the tally. Unlike classical DKG protocols where shares are exchanged in the clear, our construction uses encrypted shares and ZK-SNARK proofs of correctness. This allows the Ethereum smart contract to verify compliance without learning any of the underlying secrets, ensuring both security and verifiability in a fully decentralized setting. -{\color{blue} Let $t$ be the threshold parameter and $n$ the number of sequencers, with $t\leq n$. Let $G$ be a generator of the elliptic curve group of order $q$. Each participant $P_i$ runs the following procedure. +{\color{blue} Let $t$ be the threshold parameter and $n$ the number of \keywardens, with $t\leq n$. Let $G$ be a generator of the elliptic curve group of order $q$. Each participant $P_i$ runs the following procedure. \begin{mdframed} \begin{itemize}@@ -330,7 +332,7 @@ \begin{enumerate}
\item Select random scalars $a_{i,0},\dots,a_{i,t-1} \sample \Z_q$. \item Define the polynomial $f_i(x) = \sum_{j=0}^{t-1} a_{i,j} x^j$. \item For each $j \in \{0,\dots,t-1\}$, compute public commitments $C_{i,j} = a_{i,j}\cdot G$. - \item For each sequencer $P_\ell$ with index + \item For each participant $P_\ell$ with index $\ell \in \{1,\dots,n\}$, compute the secret share $s_{i,\ell} = f_i(\ell)$. \item Encrypt each $s_{i,\ell}$ under $P_\ell$'s public key using a simplified version of the EC integrated encryption scheme (ECIES), obtaining $EncECIES(s_{i,\ell})$. \item Output $\{C_{i,j}\}_{j=0}^{t-1}$ and $\{EncECIES(s_{i,\ell})\}_{\ell=1}^n$, together with a ZK-SNARK proof attesting that the encrypted values are consistent with the commitments.@@ -353,7 +355,7 @@ }
\end{itemize} \end{mdframed} -After collecting valid encrypted shares, each sequencer $P_j$ can recover their secret share $s_j$ by decrypting all contributions addressed to them:} +After collecting valid encrypted shares, each participant $P_j$ can recover their secret share $s_j$ by decrypting all contributions addressed to them:} \begin{mdframed} \begin{itemize}@@ -381,7 +383,7 @@ }
\end{itemize} \end{mdframed} -This approach ensures that the encryption public key is securely generated in a decentralized way, that each sequencer learns only their own secret share, and that the correctness of the entire DKG procedure is verifiable on-chain. Misbehavior, such as submitting invalid shares, can be detected and penalized through the slashing mechanism enforced by the smart contract (see Section~\ref{sec:token}). +This approach ensures that the encryption public key is securely generated in a decentralized way, that each \keywarden learns only their own secret share, and that the correctness of the entire DKG procedure is verifiable on-chain. Misbehavior, such as submitting invalid shares, can be detected and penalized through the slashing mechanism enforced by the smart contract (see Section~\ref{sec:token}). \subsection{Zero-knowledge proof systems} \label{sec:cryptographic-primitives:zkp}
@@ -1,32 +0,0 @@
-% !TeX root = ../build/main.tex - - -\Davinci represents the evolution of the Vocdoni voting protocol. It integrates smart contracts for orchestration, a zkSNARK-based state machine for verifying and accumulating votes, and a decentralized data availability layer to ensure censorship resistance. - -\paragraph{Design principles.} - -To build the \davinci stack, we adhere to the following design principles: - -\begin{enumerate} - \item \textbf{Cryptography as the source of truth}: we rely exclusively on cryptographic proofs to ensure the integrity and security of the voting process. By trusting only in cryptography, we eliminate the need for centralized authorities, making the system inherently secure and transparent. - - \item \textbf{Trustlessness}: our system operates without requiring trust in any single party. Through cryptographic protocols and decentralized infrastructure, we ensure system integrity and prevent compromise from any malicious actor. - - \item \textbf{End-to-end verifiability}: every voter can verify their ballot from casting to result computation (individual verifiability). Additionally, any third party can audit the election data to confirm results (universal verifiability) and verify that each vote comes from a uniquely registered voter (eligibility verifiability). Transparent cryptographic mechanisms make this possible. - - \item \textbf{Composability}: the system is modular, consisting of interchangeable components that can be rearranged or integrated with external systems via adaptable interfaces. This allows for redundancy, flexibility, and seamless integration with third-party applications, exemplified by our voting-as-a-service APIs. - - \item \textbf{Accessibility}: Vocdoni’s voting platform (App) is open source, universally available and user-friendly. The interface is intuitive for all users, including those less familiar with technology, and accommodates voters that use assistive technologies like screen readers. - - \item \textbf{Open source}: by releasing our code openly, we invite anyone to audit and contribute, enhancing security and fostering community engagement. Transparency prevents security through obscurity and accelerates innovation. - - \item \textbf{Resilience}: we design for robustness against hardware failures, network outages, and censorship. Infrastructure decentralization and distributed ownership enhance system availability and resistance to attacks. - - \item \textbf{Scalability}: our solution processes votes at high throughput, exceeding current requirements to accommodate future growth. The decentralized infrastructure scales organically as usage increases, ensuring consistent performance. - - \item \textbf{Receipt-freeness}: to mitigate risks of collusion, coercion, and vote-buying, the system enables voters to verify their votes without being able to prove to others how they voted, thus reducing incentives for coercion and bribery. Additionally, voters are allowed to overwrite their votes while maintaining secrecy. - - \item \textbf{Automation}: we minimize human intervention through smart contracts and cryptographic protocols, reducing costs and human error. Automation ensures consistent operation and frees resources for voter support and auditing. -\end{enumerate} - -
@@ -3,18 +3,21 @@
Online voting remains one of the most studied yet elusive applications in applied cryptography. As digital services expand across both public and private sectors, secure and universally verifiable online voting systems have become an increasingly desirable goal. Remote electronic voting promises scalability, accessibility, and administrative efficiency; yet the design of systems that simultaneously ensure privacy, integrity, coercion resistance, and transparency under realistic adversarial models remains a formidable challenge. Numerous deployments have revealed deep-rooted usability flaws and security gaps, particularly when verifiability mechanisms are either poorly understood by users or reliant on centralized infrastructure. -Against this backdrop, the Vocdoni project was initiated in 2018 with the aim of rethinking online voting from first principles. The name Voĉdoni, meaning “to give voice” in Esperanto, reflects the project’s foundational goal: to empower collectives—from small associations to millions of citizens—to engage in secure and verifiable decision-making, regardless of technological or institutional barriers. Central to this vision was the idea that voting is not limited to formal governmental elections but serves as a more general-purpose mechanism for collective signaling. Vocdoni introduced a fully anonymous, end-to-end verifiable voting system designed to operate efficiently across a range of devices, including smartphones. To support these goals, the team deployed a custom infrastructure emphasizing resilience, neutrality, and transparency. +Against this backdrop, the Vocdoni project was initiated in 2018 with the aim of rethinking online voting from first principles. The name Voĉdoni, meaning “to give voice” in Esperanto, reflects the project’s foundational goal: to empower collectives—from small associations to millions of citizens—to engage in secure and verifiable decision-making, regardless of technological or institutional barriers. Central to this vision was the idea that voting is not limited to formal governmental elections but serves as a more general-purpose mechanism for collective signaling. Vocdoni introduced a fully anonymous end-to-end verifiable voting system designed to operate efficiently on a range of devices, including smartphones. To support these goals, the team deployed a custom infrastructure emphasizing resilience, neutrality, and transparency. -Technically, the architecture of Vocdoni was grounded on a bespoke {Byzantine fault tolerant} (BFT) layer-1 blockchain, named Vochain. At the time, {zero-knowledge} (ZK) proof systems such as ZK-SNARKs were emerging but not yet practical for most deployments. Vochain provided a performant and low-cost environment (achieving approximately 700 transactions per second) where advanced cryptographic tools could be used without the constraints imposed by blockchains based on the {Ethereum virtual machine} (EVM). The ability to issue voting transactions without requiring user fees enabled broader accessibility. Over several years of development and deployment, this architecture proved both viable and valuable in practice. However, broader adoption as a universal voting protocol highlighted the need for further architectural refinements and stronger formal guarantees. +Technically, the architecture of Vocdoni was based on a bespoke \ac{BFT} layer-1 blockchain, named Vochain. At the time, efficient zero-knowledge (ZK) proof systems were emerging, but not yet practical for most deployments. Vochain provided a performant and low-cost environment (achieving approximately 700 transactions per second) in which advanced cryptographic tools could be used without the constraints imposed by general-purpose blockchains based on the \ac{EVM}. The ability to issue voting transactions without requiring user fees enabled broader accessibility. Over several years of development and deployment, this architecture proved both viable and valuable in practice. However, broader adoption as a universal voting protocol highlighted the need for further architectural refinements and stronger formal guarantees. In this work, we introduce \davinci, a new protocol that builds upon the lessons and conceptual groundwork laid by Vocdoni. \Davinci adopts a modular design and integrates state-of-the-art cryptographic tools, including succinct ZK proofs, improved bulletin board constructions, and robust coercion resistance mechanisms—reflecting the most recent advances in academic research. Unlike monolithic designs, \davinci is conceived as a composable primitive: a foundational layer intended to support secure and verifiable voting in diverse contexts, from blockchain governance to institutional elections. This shift in design philosophy aims to address long-standing challenges in the field, offering a cleaner abstraction with clearer security boundaries and formal underpinnings.\\ \subsection{Contributions} \label{sec:introduction:contributions} -This work introduces \davinci, a modular and verifiable protocol for digital voting, designed to support privacy-preserving, auditable, and adaptable election processes across diverse governance contexts. The protocol models voting as a constrained state machine, in which each valid operation is expressed as a formally defined state transition, enforced through succinct ZK proofs. That is, at the core of the system lies a set of reusable arithmetic circuits that implement voter authentication, encrypted ballot validation, state transitions, and tally finalization. These circuits are optimized for off-chain proving and are compatible with modern ZK-SNARK systems. Application-layer state is maintained off-chain and committed on-chain using cryptographic accumulators, specifically Merkle trees. The protocol defines two such trees: one for the voter registry (the census) and one for the voting state. These trees enable voters and verifiers to produce efficient inclusion and transition proofs, while minimizing on-chain storage and computation. +This work introduces \davinci, a modular and verifiable protocol for digital voting, designed to support privacy-preserving, auditable, and adaptable election processes across diverse governance contexts\roger{consider adding "meeting the most demanding democratic standards"}. The protocol models voting as a constrained state machine, in which each valid operation is expressed as a formally defined state transition, enforced through succinct \ac{ZK} proofs\pau{Molt bona aquesta definició! Tindria sentit fer algun tipus de highlighting? negreta o similar?}. That is, at the core of the system lies a set of reusable arithmetic circuits that implement voter authentication, encrypted ballot validation, state transitions, and tally finalization. These circuits are optimized for off-chain proving and are compatible with modern \ac{ZK-SNARK} protocols. Application-layer state is maintained off-chain and committed on-chain using cryptographic accumulators, specifically Merkle trees. +%The protocol defines two such trees: one for the voter registry (the census) and one for the voting state. These trees enable voters and verifiers to produce efficient inclusion and transition proofs, while minimizing on-chain storage and computation. + +\paui{Potser es pot fer un rephrasing aquí pq no es repeteixi tant amb el paràgraf anterior.} -To coordinate protocol execution, \davinci includes a set of Ethereum smart contracts that mediate the setup of elections, manage finalization procedures, and verify submitted proofs of correctness. A standardized transaction and data encoding format supports all stages of the process, including vote casting, aggregation, and result publication. This approach ensures that protocol interactions remain deterministic and interoperable across clients and backends. The system also introduces the Vocdoni token, which is used to align incentives between participants. Altogether, the design aims to balance auditability and privacy while reducing trust assumptions on infrastructure providers. By cleanly separating concerns and providing modular interfaces, the protocol is intended to serve as a foundation for both practical deployments and future extensions, such as integration with alternative identity systems, off-chain data availability layers, or other consensus backends. +To coordinate protocol execution over a decentralized network of nodes, \davinci includes a set of Ethereum smart contracts that mediate the setup of elections, manage finalization procedures, and verify submitted proofs of correctness. A standardized transaction and data encoding format supports all stages of the process, including vote casting, aggregation\roger{consider specifying what is aggregated: "ballots aggregation", "votes aggregation", etc.}, and result publication. This approach ensures that protocol interactions remain deterministic and interoperable across clients and backends. The system also introduces the Vocdoni token, which is used to align incentives between participants. Altogether, the design aims to balance auditability and privacy while reducing trust assumptions on infrastructure providers. By cleanly separating functionalities and providing modular interfaces, the protocol is intended to serve as a foundation for both practical deployments and future extensions, such as integration with alternative identity systems, off-chain data availability layers, or other consensus backends. \begin{itemize} \item The Vocdoni voting protocol.@@ -25,7 +28,7 @@ \subsection{Related work}
\label{sec:introduction:sota} \begin{itemize} - \item State of the art of e-voting: \url{https://azkr.org/blog/evoting-review/}. + \item State of the art of e-voting: \url{https://research.azkr.org/blog/evoting-review/}. \end{itemize} \subsection{Paper organization}
@@ -1,6 +1,8 @@
% !TeX root = ../build/main.tex -Merkle trees are used to create a cryptographic representation of both the voter census registry and the voting process state. +{\color{blue}Consider removing this section and creating new sections \textbf{1. Census} and \textbf{2. State tree}.}\\ + +\noi Merkle trees are used to create a cryptographic representation of both the voter census registry and the election state. %\begin{itemize} % \item \textbf{Census}: Each voter is assigned a Merkle proof, which they use to prove their eligibility to vote. This mechanism ensures efficient and secure verification of voter eligibility.@@ -37,7 +39,7 @@
\paragraph{Reserved addresses for metadata.} The first six addresses are reserved for the process parameters as follows: \begin{itemize} - \item \texttt{0x0}: it stores a unique identifier for the voting process (\processid). + \item \texttt{0x0}: it stores a unique identifier for the election (\processid). \item \texttt{0x1}: it stores the committed census root (\censusroot). %and \type, a field in case the organization was using a different structure for the census than a MT. \item \texttt{0x2}: it stores the ballot mode configuration, which is the set of rules for validating votes (\ballotmode). \item \texttt{0x3}: it stores the encryption public key used to encrypt the votes (\epk).@@ -45,7 +47,7 @@ \item \texttt{0x4}: it stores an accumulator of the encrypted votes that need to be added to the tally (\addaccumulator).
\item \texttt{0x5}: it stores an accumulator of the encrypted votes that need to be substracted from the tally because they have been overwritten (\substractaccumulator). \end{itemize} -\paragraph{Encrypted ballots.} Each voter’s encrypted ballot is stored in the state tree at a leaf whose path corresponds to their Ethereum address (or another unique identifier). The leaf value is the ciphertext corresponding to the ballot generated under the election’s public encryption key. If the voter later overwrites their ballot, the same path is updated with the new ciphertext. +\paragraph{Encrypted ballots.} Each voter’s encrypted ballot is stored in the state tree at a leaf whose path corresponds to their Ethereum address (or another unique identifier). The leaf value is the ciphertext corresponding to the ballot encrypted under the election’s encryption public key. If the voter later overwrites their ballot, the same path is updated with the new ciphertext. \paragraph{Vote identifiers.} In addition to storing ballots, the state tree also tracks the set of vote identifiers. Each vote identifier \voteid, which is derived from the \processid, the voter’s address, and fresh randomness, determines the path to a dedicated leaf. Initially empty, these leaves are filled when the corresponding \voteid is used, thereby recording that it has been consumed. This enables efficient non-membership proofs: before accepting a new ballot, the sequencer checks that the corresponding \voteid path is still empty, and upon inclusion, the leaf is marked as used to prevent reuse. \\@@ -57,6 +59,8 @@ \caption{Structure of the state Merkle tree. The first leaves are reserved for global process parameters while subsequent leaves store encrypted ballots indexed by voter addresses and vote identifiers.}
\label{fig:mt-state} \end{figure} -At the beginning of the election, the state tree is initialized with the process parameters and empty accumulators, and its root ($\stateroot$) is published on-chain. As the voting progresses, sequencers update the tree whenever new votes are received, producing a new root for each transition. To guarantee correctness, each update is accompanied by a ZK-SNARK proof attesting that the transition from the previous root to the new root respects all protocol constraints: ballots are well-formed and comply with the voting rules, voters are eligible according to the census, the \voteid non-membership condition prevents double voting (or overwrites are handled correctly), and encrypted results are aggregated consistently. In addition, sequencers reencrypt stored ciphertexts, including both newly submitted and already included ballots. This mechanism refreshes the randomness of the encrypted votes without altering their underlying content, ensuring receipt-freeness and concealing whether a particular ballot has been overwritten or simply re-randomized. +\paragraph{Initial state.} At the beginning of the election, the state tree is initialized with the process parameters and empty accumulators, and its root ($\stateroot$) is published on-chain. + +\paragraph{State transitions.} As the voting progresses, sequencers update the tree whenever new votes are received, producing a new root for each transition. To guarantee correctness, each update is accompanied by a \ac{ZK-SNARK} proof attesting that the transition from the previous root to the new root respects all protocol constraints: ballots are well-formed and comply with the voting rules, voters are eligible according to the census, the \voteid non-membership condition prevents double voting (or overwrites are handled correctly), and encrypted results are aggregated consistently. In addition, sequencers reencrypt stored ciphertexts, including both newly submitted and already included ballots. This mechanism refreshes the randomness of the encrypted votes without altering their underlying content, ensuring receipt-freeness and concealing whether a particular ballot has been overwritten or simply re-randomized. In this way, the state tree provides a compact and tamper-proof commitment to the current status of the election. At the end of the process, the final state root together with the on-chain verification of all transitions serves as a complete cryptographic record of the election, encapsulating both the tally and the integrity of the entire voting procedure.
@@ -1,10 +1,15 @@
% !TeX root = ../build/main.tex -A voting process involves three types of participants: the organizer, the sequencer, and the voters. +An election involves four types of participants: the organizer, the \keywardens, the voters, and the sequencers. \paragraph{Organizer.} The organizer is the entity responsible for defining and setting up the voting process. Its key responsibilities include defining the voting parameters and gathering the census data. The organizer ensures that the election is structured correctly but does not participate in vote collection or tallying. -\paragraph{Sequencer.} Sequencers are a set of decentralized parties that facilitate the voting process. On the one hand, they collaboratively generate a public encryption key that voters use to encrypt their votes. Then, during the voting phase, they receive and verify encrypted votes from voters and reencrypt votes to prevent coercion. -%Old text: the Sequencer is a specialized component designed to handle the voting process using zero-knowledge proof mechanisms. It ensures that all transactions related to this process are validated and sequenced. The Sequencers periodically commit the state of the voting process to Ethereum. +\paragraph{\Keywardens.} \Keywardens are a set of decentralized parties that collaboratively generate a public encryption key that voters use to encrypt their votes. + +\paragraph{Voters.} Voters are the participants that belong the census and are allowed to cast their votes in the election. + +\paragraph{Sequencers.} Sequencers are a set of parties that during the voting period receive and verify encrypted ballots from voters, reencrypt votes to prevent coercion, and update the shared public state accordingly. -\paragraph{Voter.} Voters are the participants that belong the census that cast their votes in the election. +%Sequencers are a set of decentralized parties that facilitate the election during the voting period. They receive and verify encrypted ballots from voters, reencrypt votes to prevent coercion, and update the shared public state accordingly. + +%Old text: the Sequencer is a specialized component designed to handle the voting process using zero-knowledge proof mechanisms. It ensures that all transactions related to this process are validated and sequenced. The Sequencers periodically commit the state of the voting process to Ethereum.
@@ -1,12 +1,16 @@
% !TeX root = ../build/main.tex -In this section we describe the overall flow of the \davinci voting protocol. The process is structured into four main phases: voting setup, encryption key generation, votes collection, and results validation. Each phase specifies the interactions between the organizer, voters, sequencers, and the smart contracts that coordinate the voting process. An overview of the complete process is shown in Figure~\ref{fig:protocol-flow}. +In this section we describe the overall flow of the \davinci voting protocol. The process is structured into five main phases: election setup, encryption key generation, voting period, decryption key generation, and tally finalization. Each phase specifies the interactions between the organizer, \keywardens, voters, sequencers, and the smart contracts that coordinate the election. An overview of the complete process is shown in Figure~\ref{fig:protocol-flow}. -\subsubsection{Voting setup} +\subsubsection{Election setup} \label{sec:vocdoni-protocol:setup} In this phase, sequencers register and the organizer sets the election up.\\ +\rogeri{I'd put this outside of the "voting process". I think adding a section "System setup and operation"-like before this one and rename this one as "voting process flow" (or simply "voting process") could ease the explanation.} + +\martai{This section is outdated. Sequencers do not register, and we should remove the colours and boxes.} + \noi \sequencers Sequencers must first register in the sequencer registry smart contract, a process that remains open continuously. Registration involves publishing their identity, network endpoint (e.g., URI), and a collateral deposit to ensure honest participation. The collateral can later be slashed in case of misbehavior. \\@@ -14,29 +18,31 @@ \noi \organizer For each new election, the organizer performs the following steps:
\begin{enumerate} \item Prepare the census data \censusdata\ and generate the census Merkle tree $\censusTree$ with that data. \item Compute the census commitment $\censusroot = \censusTree.\hlget{\MTRoot}()$. - \item Define the election details, including duration, options, and the ballot mode $\ballotmode$. + \item Prepare the voting form (ballot / set of questions), upload it to IPFS, compute commitment. + \item Define the election details, including duration, options, and the ballot rules $\ballotmode$ (see Section~\ref{sec:ballot-protocol}). \item Compute a unique process identifier $\processid$, which is a 32-byte number derived from the organizer’s Ethereum address, nonce, and the chain ID. \item Set security parameters for the %forthcoming DKG ceremony (e.g., timeout, minimum number of sequencers). - \item Submit all this information in a transaction to the process management smart contract {\color{blue}(pay tx fees)}. + \item Submit all this information in a transaction to the process management smart contract {\color{blue}(pay tx fees)}: + \[ tx_{org} = (\censusroot, ballotCommitment, \ballotmode, electionMetadata, \processid, dkgParameters).\] \end{enumerate} \subsubsection{Encryption key generation} \label{sec:vocdoni-protocol:keygen} -In this phase, sequencers collectively generate the public encryption key.\\ +In this phase, \keywardens collectively generate the public encryption key.\\ -\noi \sequencers -Sequencers fetch the process parameters ($\processid$, $\ballotmode$, $\censusroot$) from the process management smart contract and participate in a DKG protocol before the timeout set by the organizer expires. If the minimum number of sequencer contributions is reached, the public encryption key $\epk$ is derived and made available on-chain. This ensures that no single party controls the secret key, and that decryption later requires threshold participation {\color{blue}(give more details)}.\\ +\noi \Keywardens fetch the process parameters ($\processid$, $\ballotmode$, $\censusroot$) from the process management smart contract and participate in a DKG protocol before the timeout set by the organizer expires. If the minimum number of contributions is reached, the public encryption key $\epk$ is derived and made available on-chain. This ensures that no single party controls the secret key, and that decryption later requires threshold participation {\color{blue}(give more details)}.\\ \noi {\color{blue} Alternatively, generate a SNARK proving the EPK has been generated correctly and the contract verifies it.} -\subsubsection{Votes collection} +\subsubsection{Voting period} \label{sec:vocdoni-protocol:votes} -In this phase, voters cast their ballots and send them to the sequencers, who collect them. \\ +In this phase, voters cast their ballots and send them to the sequencers, who collect and process them. \\ + +\noi \textbf{(a) Vote casting.} To cast a ballot, a voter does the following: -\noi \voter To cast a ballot, a voter does the following: \begin{enumerate} \item Select a sequencer from the sequencer registry smart contract. \item Retrieve their census membership proof $\censusproof$ to prove eligibility.@@ -66,8 +72,8 @@ %\[ \signature = \hlget{\SSign}_{\sk}(\voteid).\]
%\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 ]. \] +\noi \textbf{(b) Vote batching.} Upon receiving votes, a sequencer does the following: -\noi \sequencers Upon receiving votes, a sequencer does the following: \begin{enumerate} {\color{blue} \item Retrieve the current state root $\stateroot$ and census root $\censusroot$ from the process management smart contract and the associated data from the Ethereum data blobs.@@ -81,27 +87,31 @@ \item consistency between data blobs and the on-chain state.
\end{itemize} \item Submit the updated state root to the smart contract, while the full data are stored in Ethereum blobs. } + \martai{If \stateroot changed, repeat last circuit.} \end{enumerate} Sequencers repeat this process until the voting deadline set by the organizer. -\subsubsection{Results validation} +\subsubsection{Decryption key generation} +\label{sec:vocdoni-protocol:deckey-gen} + +\subsubsection{Tally finalization} \label{sec:vocdoni-protocol:results} {\color{blue} After the voting period expires, $t$ out of $n$ sequencers publish their decryption shares of the election private key. Once the threshold is reached, the election secret key can be reconstructed (on-chain or off-chain), enabling the decryption of the aggregated tally. -Rewards and penalties for sequencers are managed according to their correct participation: sequencers are rewarded proportionally to the number of votes sequenced, and may be slashed for failing to provide a valid decryption share. +Rewards and penalties for sequencers are managed according to their correct participation: sequencers are rewarded proportionally to the number of votes sequenced, and may be slashed for failing to provide a valid decryption share (INCENTIVATION MECHANISM). At this point: \begin{itemize} - \item Anyone can verify the correctness of the final results by checking the zkSNARK state proofs and on-chain commitments. - \item The combination of the final state root, the decryption of the accumulators, and the publicly verifiable zkSNARK proofs guarantees the integrity of the entire voting process. + \item Anyone can verify the correctness of the final results by checking the \ac{ZK-SNARK} state proofs and on-chain commitments. + \item The combination of the final state root, the decryption of the accumulators, and the publicly verifiable \ac{ZK-SNARK} proofs guarantees the integrity of the entire voting process. \end{itemize} The process is considered finalized once the decrypted tally is available and all state transition proofs have been verified on-chain. At this stage, both the election results and the complete integrity of the process are permanently recorded and publicly auditable.} \begin{figure}%[H] \centerline{\includegraphics[width=370pt,draft=false]{\figs/protocol-flow}} - \caption{Vocdoni voting process overview.} + \caption{Vocdoni voting process overview. {\color{blue}Figure is OUTDATED.}} \label{fig:protocol-flow} \end{figure}
@@ -1,38 +1,49 @@
% !TeX root = ../build/main.tex -All the voting process is governed by the rules encoded in three smart contracts: the \textit{process management}, the \textit{sequencer registry}, and the \textit{results verification} smart contract. All these three contracts are deployed on the Ethereum blockchain, and ensure that the execution of all steps is transparent and unalterable. The protocol consists of 5 phases, as illustrated in Figure~\ref{fig:protocol-intuition}, and described below. +The following section provides an overview of the DAVINCI protocol, describing its main phases and actors without delving into technical details. The voting process is governed by smart contracts deployed on Ethereum, which ensure transparency, enforce rules, and verify proofs. As shown in Figure~\ref{fig:protocol-intuition}, the protocol consists of five main phases, from the setup of the election to the publication and verification of final results. +%All the voting process is governed by the rules encoded in three smart contracts: the \textit{process management}, the \textit{sequencer registry}, and the \textit{results verification} smart contract. All these three contracts are deployed on the Ethereum blockchain, and ensure that the execution of all steps is transparent and unalterable. The protocol consists of five phases, as illustrated in Figure~\ref{fig:protocol-intuition} and described below. The first two occur during the preparation period, the subsequent two during the voting period, and the final one takes place in the tally period. +\rogeri{a rough explanation about how double-spending (i.e. double vote-count) is prevented should be included somewhere in this section (as it is explained how coercion and vote-buying is mitigated).} \begin{figure}[h] - \centerline{\includegraphics[width=400pt,draft=false]{\figs/protocol-intuition-flow}} + \centerline{\includegraphics[width=320pt,draft=false]{\figs/protocol-intuition-flow}} \setlength{\abovecaptionskip}{0pt} % Space between figure and caption - \caption{Overview of the protocol flow.} + \caption{Overview of the protocol flow. {\color{blue}Figure is outdated with respect to new actors and phases.}} \label{fig:protocol-intuition} %\setlength{\belowcaptionskip}{0pt} % Space after caption \end{figure} %\vspace{-0.5cm} -\paragraph{$\boxed{1}$ Voting setup.} - -In the first phase, the organizing entity gathers all census data and generates a cryptographic commitment to this data. %using a Merkle tree (MT) root. -Additionally, the organizer defines the voting parameters, including the number of voting options and the vote-counting mechanism (e.g., weighted voting, quadratic voting, etc.). Once these details are set, the organizer submits a transaction to the process management smart contract on the Ethereum blockchain. This transaction publicly records the voting parameters and census commitment, ensuring transparency and preventing any subsequent alterations to the voting setup. - -\paragraph{$\boxed{2}$ Encryption key generation.} - -A designated group of participants, referred to as \textit{sequencers}, collaboratively generate a shared encryption public key, which voters will use to encrypt their votes. This key is established through a {distributed key generation} (DKG) protocol, ensuring that no single party can control or reconstruct the corresponding private key independently. -Sequencers have a dual role in the protocol. In addition to generating the encryption key, they are also responsible for collecting votes from voters during the election. Consequently, their public key and the necessary information to contact them off-chain must be registered in the sequencer registry smart contract. Once the encryption public key is securely computed and published in the sequencer registry smart contract, the voting phase can start. - -\paragraph{$\boxed{3}$ Voting.} - -Voters select their preferred option according to the voting rules established by the organizer and captured in the process management smart contract. Instead of submitting their votes directly on-chain, they send them off-chain to a sequencer of their choice for processing. To ensure privacy, votes are encrypted using the available encryption public key. -Additionally, users compute a unique vote identifier that will allow them to verify that their vote has been included in the final result. Alongside the encrypted vote and the vote identifier, each voter must also provide the following data: a proof of valid voting, demonstrating that the vote complies with the election rules; a proof of eligibility, verifying that they are registered in the census; and a proof of identity ownership, in the form of a digital signature, confirming that they are the legitimate voter and are not impersonating someone else. Finally, to mitigate coercion and vote-buying, the protocol allows voters to overwrite their vote any number of times during the voting phase. - -\paragraph{$\boxed{4}$ Votes collection.} - -During this phase, sequencers collect encrypted votes from multiple voters along with their corresponding proofs, and verify the validity of these submissions. That is, sequencers -verify the signatures, to ensure the votes were cast by legitimate voters, they verify the proof of compliance, confirming that each vote adheres to the polling rules, and the census membership proofs against the commitment to the census data that was originally registered in the process management smart contract. Once the sequencers have processed and verified all votes, they must prove that these verifications were performed correctly. Instead of submitting individual verifications for each vote, they generate a single ZK proof that attests to the correctness of all verifications. -%they compress multiple individual verification into one. -Additionally, the sequencers reencrypt the votes and generate a proof of the correct reencryption computation. While this process does not alter the final tally, it prevents voters from decrypting their original vote. This step mitigates vote selling or coercion, as voters are no longer able to prove their choice to third parties. Finally, the sequencers submit the reencrypted votes along with their verification and reencryption proofs to the process management smart contract. The smart contract verifies all the proofs provided by the sequencers to check that they complied with the protocol. - -\paragraph{$\boxed{5}$ Results verification.} -{\color{blue}At the conclusion of the voting period, the smart contract ceases to accept new state updates, effectively finalizing the process. The final state is then available on-chain for verification, providing an immutable record of the voting outcome.}+\begin{enumerate} + \item \textit{Election setup}. + In the first phase, the \emph{organizer} gathers all census data and generates a cryptographic commitment to this data. %using a Merkle tree (MT) root. + Additionally, the organizer defines the voting parameters, including the number of voting options and the vote-counting mechanism (e.g., weighted voting, quadratic voting, etc.). Once these details are set, the organizer submits a transaction to the process management smart contract on the Ethereum blockchain. This transaction publicly records the voting parameters and census commitment, ensuring transparency and preventing any subsequent alterations to the voting setup.\\ + % + \item \textit{Encryption key generation.} + A designated group of participants, referred to as \emph{\keywardens}, collaboratively generate a shared encryption public key, which voters will use to encrypt their votes. This key is established through a {distributed key generation} (DKG) protocol, ensuring that no single party can control or reconstruct the corresponding private key independently. + %Sequencers have a dual role in the protocol. In addition to generating the encryption key, they are also responsible for collecting votes from voters during the election. Consequently, their public key and the necessary information to contact them off-chain must be registered in the sequencer registry smart contract. + Once the encryption public key is securely computed and published in the smart contract, the voting period can start.\\ + % + \item \textit{Voting period}. + During the voting period, two actors interact continuously: \textit{voters}, who cast their encrypted ballots, and \emph{sequencers}, independent entities responsible for collecting, verifying, and processing these ballots before committing them to the shared state. Both processes, ballot submission by voters (\ref{sec:protocol-intuition:vote-casting}) and vote batching by sequencers (\ref{sec:protocol-intuition:vote-batching}), occur continuously and in parallel throughout this phase. + The voting period remains open until the deadline defined by the organizer, allowing voters to submit or overwrite ballots at any time, while sequencers periodically process new submissions and update the election state accordingly. + + %to a separate entity called \textit{sequencers}, which are independent participants responsible for collecting, validating, and processing votes before committing them to the shared state. + + \begin{enumerate} + \item \label{sec:protocol-intuition:vote-casting} \textit{Vote casting}. + Voters select their preferred choices according to the voting rules established by the organizer and captured in the process management smart contract. Instead of submitting their votes directly on-chain, they send them off-chain to a sequencer of their choice for processing. + To ensure privacy, votes are encrypted using the available encryption public key. To ensure privacy, votes are encrypted using the available encryption public key. Additionally, users compute a unique vote identifier that will allow them to verify that their vote has been included in the final result. Alongside the encrypted vote and the vote identifier, each voter must also provide the following data: a proof of valid voting, demonstrating that the vote complies with the election rules; a proof of eligibility, verifying that they are registered in the census; and a proof of identity ownership, in the form of a digital signature, confirming that they are the legitimate voter and are not impersonating someone else. To mitigate coercion and vote-buying, the protocol allows voters to overwrite their vote any number of times during the voting phase. \\ + % + \item \label{sec:protocol-intuition:vote-batching} \textit{Vote batching}. + During this phase, sequencers collect encrypted votes from multiple voters along with their corresponding proofs, and verify the validity of these submissions. That is, sequencers + verify the signatures, to ensure the votes were cast by legitimate voters; they verify the proof of compliance, confirming that each vote adheres to the polling rules, and the census membership proofs against the commitment to the census data that was originally registered in the process management smart contract. Once the sequencers have processed and verified all votes, they must prove that these verifications were performed correctly. Instead of submitting individual verifications for each vote, they generate a single ZK proof that attests to the correctness of all verifications. + %they compress multiple individual verification into one. + Additionally, the sequencers reencrypt the votes and generate a proof of the correct reencryption computation. While this process does not alter the final tally, it prevents voters from decrypting their original vote. This step mitigates vote selling or coercion, as voters are no longer able to prove their choice to third parties. Finally, sequencers submit the reencrypted votes along with their verification and reencryption proofs to the process management smart contract. The smart contract verifies all the proofs provided by the sequencers to check that they complied with the protocol.\\ + \end{enumerate} + % + \item \textit{Decryption key generation}.\\ + % + \item \textit{Tally finalization}. + At the end of the voting period, the smart contract ceases to accept new state updates, effectively finalizing the process. The organizer then computes the outcome of the election and submits both the results and a proof of correctness to the smart contract. The contract verifies the proof, ensuring that the tally has been derived faithfully from the final state. Once this verification succeeds, the results and the corresponding state root remain available on-chain, providing an immutable record of the election outcome that can be independently audited by anyone. +\end{enumerate}
@@ -1,9 +1,17 @@
% !TeX root = ../build/main.tex -An Ethereum compatible network is used as the source of truth for the voting system. By leveraging an Ethereum virutal machine (EVM) blockchain, the voting process management ensures that all transitions are immutable and verifiable by all participants. To this end, we implement the following three smart contracts. +An Ethereum compatible network is used as the source of truth for the voting system. By leveraging an Ethereum virutal machine (EVM) blockchain, the voting process management ensures that all transitions are immutable and verifiable by all participants. To this end, we implement the following three smart contracts.\\ -\paragraph{Process management smart contract.} It is responsible for the life-cycle management of voting processes. It includes the initiation, monitoring, execution, and closure of voting events. +\noi {\color{blue}\textbf{TODO}: add methods and state variables. Smart contracts are outdated.} -\paragraph{Sequencer registry smart contract.} It keeps track of the existing available sequencers, stores the collateral of the sequencers to ensure (that incentivizes) good behaviour, and is used to coordinate the distributed key generation when a new voting process is created. +\subsubsection{Process management} -\paragraph{Results verification smart contract.} For each voting process, this smart contract maintains the integrity of the cast votes and process life cycle. It verifies that each state transition committed by a sequencer adheres to the predefined rules.\\ +It is responsible for the life-cycle management of voting processes. It includes the initiation, monitoring, execution, and closure of voting events. + +\subsubsection{Sequencer registry} + +It keeps track of the existing available sequencers, stores the collateral of the sequencers to ensure (that incentivizes) good behaviour, and is used to coordinate the distributed key generation when a new voting process is created. + +\subsubsection{Results verification} + +For each voting process, this smart contract maintains the integrity of the cast votes and process life cycle. It verifies that each state transition committed by a sequencer adheres to the predefined rules.
@@ -1,7 +1,11 @@
% !TeX root = ../build/main.tex +{\color{blue}In this section, we describe/propose incentive mechanisms. However, this is not the only way. Additionally, we should change the word sequencer by key warden wherever applicable.} + +\subsection{The Vodoni token} + \Davinci introduces the Vocdoni token (\token) as a key element of its decentralized voting ecosystem, playing a crucial role in the protocol's sustainability. -The token serves multiple utility functions that align the incentives of all participants (voting organizers, sequencers, and voters), ensuring the integrity, efficiency, and security of the system. In particular, the token has the following roles. +The token serves multiple utility functions that align the incentives of all participants (organizer, key wardens, voters, and sequencers), ensuring the integrity, efficiency, and security of the system. In particular, the token has the following roles. \begin{itemize} \item \emph{Collateral for sequencers.} Sequencers must stake \token tokens as collateral to participate. This serves as a safeguard to ensure responsible participation. Misbehavior or failure to meet obligations can result in penalties, including partial or total loss of the stake.