Skip to content

Commit 5be3e40

Browse files
authored
Merge pull request #178 from dedis/d-voting_frontend_ghita
Changes all occurrence of "election" into "form"
2 parents 04dfa9a + edf5cfe commit 5be3e40

File tree

134 files changed

+2576
-2588
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

134 files changed

+2576
-2588
lines changed

README.md

+40-38
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,9 @@ This project was born in early 2021 and has been iteratively implemented by EPFL
7373
students under the supervision of DEDIS members.
7474

7575
⚠️ This project is still under development and should not be used for real
76-
elections.
76+
forms.
7777

78-
Main properties of the system are the following:
78+
Main properties of the system are the following:
7979

8080
<div align="center">
8181
<img height="45px" src="docs/assets/spof-black.png#gh-light-mode-only">
@@ -89,7 +89,7 @@ side-protocols always distribute trust among nodes: The distributed key
8989
generation protocol (DKG) ensures that a threshold of honest node is needed to
9090
decrypt ballots, and the shuffling protocol needs at least one honest node to
9191
ensure privacy of voters. Only the identification and authorization mechanism
92-
make use of a central authority, but can accommodate to other solutions.
92+
make use of a central authority, but can accommodate to other solutions.
9393

9494
<div align="center">
9595
<img height="45px" src="docs/assets/privacy-black.png#gh-light-mode-only">
@@ -107,11 +107,11 @@ be linked to the original voter.
107107
<img height="50px" src="docs/assets/audit-white.png#gh-dark-mode-only">
108108
</div>
109109

110-
**Transparency/Verifiability/Auditability** - The whole election process is
110+
**Transparency/Verifiability/Auditability** - The whole voting process is
111111
recorded on the blockchain and signed by a threshold of blockchain nodes. Anyone
112112
can read and verify the log of events stored on the blockchain. Malicious
113113
behavior can be detected, voters can check that ballots are cast as intended,
114-
and auditors can witness the election process.
114+
and auditors can witness the voting process.
115115

116116
## 🧩 Global architecture
117117

@@ -120,12 +120,12 @@ The project has 4 main high-level components:
120120
**Proxy** - A proxy offers the mean for an external actor such as a website to
121121
interact with a blockchain node. It is a component of the blockchain node that
122122
exposes HTTP endpoints for external entities to send commands to the node. The
123-
proxy is notably used by the web clients to use the election system.
123+
proxy is notably used by the web clients to use the voting system.
124124

125125
**Web frontend** - The web frontend is a web app built with React. It offers a
126126
view for end-users to use the D-Voting system. The app is meant to be used by
127127
voters and admins. Admins can perform administrative tasks such as creating an
128-
election, closing it, or revealing the results. Depending on the task, the web
128+
form, closing it, or revealing the results. Depending on the task, the web
129129
frontend will directly send HTTP requests to the proxy of a blockchain node, or
130130
to the web-backend.
131131

@@ -137,7 +137,7 @@ web-backend has a local database to store configuration data such as
137137
authorizations. Admins use the web-frontend to perform updates.
138138

139139
**Blockchain node** - A blockchain node is the wide definition of the program
140-
that runs on a host and participate in the election logic. The blockchain node
140+
that runs on a host and participate in the voting logic. The blockchain node
141141
is built on top of Dela with an additional d-voting smart contract, proxy, and
142142
two services: DKG and verifiable Shuffling. The blockchain node is more
143143
accurately a subsystem, as it wraps many other components. Blockchain nodes
@@ -156,9 +156,9 @@ website](https://dedis.github.io/d-voting/#/).
156156

157157
## Workflow
158158

159-
An election follows a specific workflow to ensure privacy of votes. Once an
160-
election is created and open, there are 4 main steps from the cast of a ballot
161-
to getting the result of the election:
159+
A form follows a specific workflow to ensure privacy of votes. Once an
160+
form is created and open, there are 4 main steps from the cast of a ballot
161+
to getting the result of the form:
162162

163163
<div align="center">
164164
<img height="55px" src="docs/assets/encrypt-black.png#gh-light-mode-only">
@@ -186,7 +186,7 @@ associated to its voter on the blockchain.
186186
<img height="70px" src="docs/assets/shuffle-white.png#gh-dark-mode-only">
187187
</div>
188188

189-
**3) Shuffle ballots** Once the election is closed by an admin, ballots are
189+
**3) Shuffle ballots** Once the form is closed by an admin, ballots are
190190
shuffled to ensure privacy of voters. This operation is done by a threshold of
191191
node that each perform their own shuffling. Each shuffling guarantees the
192192
integrity of ballots while re-encrypting and changing the order of ballots. At
@@ -200,7 +200,7 @@ this stage encrypted ballots cannot be linked back to their voters.
200200
**4) Reveal ballots** Once ballots have been shuffled, they are decrypted and
201201
revealed. This operation is done only if the previous step is correctly
202202
executed. The decryption is done by a threshold of nodes that must each provide
203-
a contribution to achieve the decryption. Once done, the result of the election
203+
a contribution to achieve the decryption. Once done, the result of the form
204204
is stored on the blockchain.
205205

206206
For a more formal and in-depth overview of the workflow, see the
@@ -216,16 +216,16 @@ successful only if a consensus is reached. Additionally, transactions and their
216216
results are permanently recorded and signed on an append-only ledger, making any
217217
operations on the blockchain transparent and permanent.
218218

219-
In the D-Voting system a single D-Voting smart contract handles the elections.
220-
The smart contract ensures that elections follow a correct workflow to
219+
In the D-Voting system a single D-Voting smart contract handles the forms.
220+
The smart contract ensures that forms follow a correct workflow to
221221
guarantees its desirable properties such as privacy. For example, the smart
222222
contract won't allow ballots to be decrypted if they haven't been previously
223223
shuffled by a threshold of nodes.
224224

225225
## Services
226226

227227
Apart from executing smart contracts, blockchain nodes need additional side
228-
services to support an election. Side services can read from the global state
228+
services to support a form. Side services can read from the global state
229229
and send transactions to write to it via the D-Voting smart contract. They are
230230
used to perform specific protocol executions not directly related to blockchain
231231
protocols such as the distributed key generation (DKG) and verifiable shuffling
@@ -239,13 +239,13 @@ contribution of a threshold of participants. This makes it convenient to
239239
distribute trust on encrypted data. In the D-Voting project we use the Pedersen
240240
[[1]] version of DKG.
241241

242-
The DKG service needs to be setup at the beginning of each new election, because
243-
we want each election to have its own key-pair. Doing the setup requires two
242+
The DKG service needs to be setup at the beginning of each new form, because
243+
we want each form to have its own key-pair. Doing the setup requires two
244244
steps: 1\) Initialization and 2\) Setup. The initialization creates new RPC
245245
endpoints on each node, which they can use to communicate with each other. The
246246
second step, the setup, must be executed on one of the node. The setup step
247247
starts the DKG protocol and generates the key-pair. Once done, the D-Voting
248-
smart contract can be called to open the election, which will retrieve the DKG
248+
smart contract can be called to open the form, which will retrieve the DKG
249249
public key and save it on the smart contract.
250250

251251
[1]: https://dl.acm.org/doi/10.5555/1754868.1754929
@@ -256,10 +256,10 @@ The shuffling service ensures that encrypted votes can not be linked to the user
256256
who cast them. Once the service is setup, each node can perform what we call a
257257
"shuffling step". A shuffling step re-orders an array of elements such that the
258258
integrity of the elements is guarantee (i.e no elements have been modified,
259-
added, or removed), but one can't trace how elements have been re-ordered.
259+
added, or removed), but one can't trace how elements have been re-ordered.
260260

261261
In D-Voting we use the Neff [[2]] implementation of verifiable shuffling. Once
262-
an election is closed, an admin can trigger the shuffling steps from the nodes.
262+
a form is closed, an admin can trigger the shuffling steps from the nodes.
263263
During this phase, every node performs a shuffling on the current list of
264264
encrypted ballots and tries to submit it to the D-Voting smart contract. The
265265
smart contract will accept only one shuffling step per block in the blockchain.
@@ -326,7 +326,7 @@ results.
326326
<tr>
327327
<td>Fall 2021</td>
328328
<td>Students: Auguste Baum, Emilien Duc<br>Supervisor: Noémien Kocher</td>
329-
<td>Adds a flexible election structure. Improves robustness and security.</td>
329+
<td>Adds a flexible form structure. Improves robustness and security.</td>
330330
<td>
331331
<a href="https://www.epfl.ch/labs/dedis/wp-content/uploads/2022/02/report-2021-3-baum-auguste-Dvoting.pdf">Report</a>,
332332
<a href="https://www.epfl.ch/labs/dedis/wp-content/uploads/2022/02/presentation-2021-3-baum-auguste-dvoting.pdf">Presentation</a>
@@ -350,7 +350,7 @@ results.
350350
<tr>
351351
<td>Spring 2022</td>
352352
<td>Students: Badr Larhdir, Capucine Berger<br>Supervisor: Noémien Kocher</td>
353-
<td>Major iteration over the frontend - design and functionalities: implements a flexible election form, nodes setup, and result page.</td>
353+
<td>Major iteration over the frontend - design and functionalities: implements a flexible form form, nodes setup, and result page.</td>
354354
<td>
355355
<a href="https://www.epfl.ch/labs/dedis/wp-content/uploads/2022/07/report-2022-1-capucine-badr-d-voting-frontend.pdf">Report</a>,
356356
<a href="https://www.epfl.ch/labs/dedis/wp-content/uploads/2022/07/presentation-2022-1-capucine-badr-d-voting-frontend.pdf">Presentation</a>
@@ -378,10 +378,10 @@ added to you path (like with `export PATH=$PATH:/Users/david/go/bin`).
378378
# Setup a simple system with 3 nodes
379379

380380
If you are using Windows and cannot use tmux, you need to do the actions of the
381-
scripts in point *1* and *2* manually: open 3 terminal sessions and run the
382-
commands from the section *Run the nodes* below (1 command LLVL=info memcoin etc.
381+
scripts in point _1_ and _2_ manually: open 3 terminal sessions and run the
382+
commands from the section _Run the nodes_ below (1 command LLVL=info memcoin etc.
383383
per terminal and then launch the setup script in another terminal). You can then
384-
follow the instructions below starting from point *3*.
384+
follow the instructions below starting from point _3_.
385385

386386
1: Run 3 nodes
387387

@@ -401,7 +401,6 @@ From the first terminal sessions, run:
401401
./setupnNode.sh -n 3
402402
```
403403

404-
405404
3: Launch the web backend
406405

407406
From a new terminal session, run:
@@ -425,7 +424,7 @@ REACT_APP_PROXY=http://localhost:9081 REACT_APP_NOMOCK=on npm start
425424
Note that you need to be on EPFL's network to login with Tequila. Additionally,
426425
once logged with Tequila, update the redirect URL and replace
427426
`dvoting-dev.dedis.ch` with `localhost`. Once logged, you can create an
428-
election.
427+
form.
429428

430429
5: Stop nodes
431430

@@ -435,7 +434,7 @@ election.
435434

436435
6: Troubleshoot
437436

438-
If while running
437+
If while running
439438

440439
```sh
441440
npm start
@@ -453,11 +452,13 @@ then run this instead:
453452
PORT=4000 npm start
454453
#or any other available port
455454
```
455+
456456
and in the web/frontend/src/setupProxy.js file, change :
457457

458458
```sh
459459
target: 'http://localhost:5000',
460460
```
461+
461462
with
462463

463464
```sh
@@ -486,11 +487,12 @@ Then you should be able to run the setup script:
486487
```sh
487488
./setup.sh
488489
```
490+
489491
With this other script using tmux you can choose the number of nodes that you
490492
want to set up:
491493

492494
```sh
493-
./setupnNode.sh -n 3
495+
./setupnNode.sh -n 3
494496
```
495497

496498
This script will setup the nodes and services. If you restart do not forget to
@@ -506,14 +508,13 @@ rm -rf /tmp/node{1,2,3}
506508

507509
If you have `tmux` installed, you can start a `tmux` session that will
508510
execute the above setup by running in the project root `./runNode.sh -n 3`.
509-
This command takes as argument the number of nodes.
511+
This command takes as argument the number of nodes.
510512
Once the session is started, you can move around the panes with
511513
`Ctrl+B` followed by arrow keys or by `N`. You can also have an overview of the
512514
windows with `Ctrl+B` followed by `S`.
513515

514-
515516
To end the session, run `./kill_test.sh`,
516-
which will kill each window then the `tmux` session (which you can do manually
517+
which will kill each window then the `tmux` session (which you can do manually
517518
with `Ctrl+D`), then delete the node data (i.e. the files `/tmp/node{1,2,3}`).
518519

519520
## Run the scenario test
@@ -528,18 +529,19 @@ LLVL=info memcoin --config /tmp/node1 e-voting scenarioTest --secretkey $sk
528529

529530
You can also run scenario_test.go, by running in the integration folder this
530531
command:
532+
531533
```sh
532534
NNODES=3 go test -v scenario_test.go
533535
```
534536

535-
536537
For reference, here is a hex-encoded kyber Ed25519 keypair:
537538

538539
Public key: `adbacd10fdb9822c71025d6d00092b8a4abb5ebcb673d28d863f7c7c5adaddf3`
539540

540541
Secret key: `28912721dfd507e198b31602fb67824856eb5a674c021d49fdccbe52f0234409`
541542

542-
## Run the scenario test with docker
543+
## Run the scenario test with docker
544+
543545
Use the following commands to launch and set up nodes, and start the scenario
544546
test with user defined number of nodes.
545547

@@ -554,21 +556,21 @@ Afterwards use the following commands, replace 4 by the desired nb of nodes :
554556
NNODES=4 KILLNODE=true go test -v -run ^TestScenario$ github.com/dedis/d-voting/integration -count=1
555557
```
556558

557-
Here we set KILLNODE=true or false to decide whether kill and restart a node
558-
during the election process. By default, it's set to false.
559+
Here we set KILLNODE=true or false to decide whether kill and restart a node
560+
during the voting process. By default, it's set to false.
559561

560562
To end the session, run `./kill_test.sh`.
561563

562564
To launch multiple test and get statistics, run `./autotest.sh -n 10 -r 15`.
563565

564566
N.B. run following commands to get help
567+
565568
```sh
566569
./runNode.sh -h
567570
./setupnNode.sh -h
568571
./autotest.sh -h
569572
```
570573

571-
572574
# Use the frontend
573575

574576
See README in `web/`.

0 commit comments

Comments
 (0)