@@ -188,7 +188,7 @@ associated to its voter on the blockchain.
188
188
189
189
** 3) Shuffle ballots** Once the election is closed by an admin, ballots are
190
190
shuffled to ensure privacy of voters. This operation is done by a threshold of
191
- node that each perform their own shuffling. Each shuffling guaranties the
191
+ node that each perform their own shuffling. Each shuffling guarantees the
192
192
integrity of ballots while re-encrypting and changing the order of ballots. At
193
193
this stage encrypted ballots cannot be linked back to their voters.
194
194
@@ -209,7 +209,7 @@ For a more formal and in-depth overview of the workflow, see the
209
209
## Smart contract
210
210
211
211
A smart contract is a piece of code that runs on a blockchain. It defines a set
212
- of operations that act on a global state (think of it as database) and can be
212
+ of operations that act on a global state (think of it as a database) and can be
213
213
triggered with transactions. What makes a smart contract special is that its
214
214
executions depends on a consensus among blockchain nodes where operations are
215
215
successful only if a consensus is reached. Additionally, transactions and their
@@ -377,7 +377,13 @@ added to you path (like with `export PATH=$PATH:/Users/david/go/bin`).
377
377
378
378
# Setup a simple system with 3 nodes
379
379
380
- 1: Run 3 nodes:
380
+ 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.
383
+ per terminal and then launch the setup script in another terminal). You can then
384
+ follow the instructions below starting from point * 3* .
385
+
386
+ 1: Run 3 nodes
381
387
382
388
``` sh
383
389
./runNode.sh -n 3
@@ -395,6 +401,7 @@ From the first terminal sessions, run:
395
401
./setupnNode.sh -n 3
396
402
```
397
403
404
+
398
405
3: Launch the web backend
399
406
400
407
``` sh
@@ -444,7 +451,8 @@ Then you should be able to run the setup script:
444
451
``` sh
445
452
./setup.sh
446
453
```
447
- With this other script you can choose the number of nodes that you want to set up:
454
+ With this other script using tmux you can choose the number of nodes that you
455
+ want to set up:
448
456
449
457
``` sh
450
458
./setupnNode.sh -n 3
@@ -462,28 +470,29 @@ rm -rf /tmp/node{1,2,3}
462
470
## Automate the previous setup using ` tmux `
463
471
464
472
If you have ` tmux ` installed, you can start a ` tmux ` session that will
465
- execute the above setup by running in the project root ` ./runNode.sh -n 3 ` . This
466
- command takes as argument the number of nodes.
473
+ execute the above setup by running in the project root ` ./runNode.sh -n 3 ` .
474
+ This command takes as argument the number of nodes.
467
475
Once the session is started, you can move around the panes with
468
- ` Ctrl+B ` followed by arrow keys or by ` N ` . You can also have an overview of the windows
469
- with ` Ctrl+B ` followed by ` S ` .
476
+ ` Ctrl+B ` followed by arrow keys or by ` N ` . You can also have an overview of the
477
+ windows with ` Ctrl+B ` followed by ` S ` .
470
478
471
479
472
480
To end the session, run ` ./kill_test.sh ` ,
473
- which will kill each window then the ` tmux ` session (which you can do manually with ` Ctrl+D ` ),
474
- then delete the node data (i.e. the files ` /tmp/node{1,2,3} ` ).
481
+ which will kill each window then the ` tmux ` session (which you can do manually
482
+ with ` Ctrl+D ` ), then delete the node data (i.e. the files ` /tmp/node{1,2,3} ` ).
475
483
476
484
## Run the scenario test
477
485
478
- If nodes are running and ` setup.sh ` or ` ./setupnNode.sh -n 3 ` has been called, you can run a test
479
- scenario:
486
+ If nodes are running and ` setup.sh ` or ` ./setupnNode.sh -n 3 ` has been called,
487
+ you can run a test scenario:
480
488
481
489
``` sh
482
490
sk=28912721dfd507e198b31602fb67824856eb5a674c021d49fdccbe52f0234409
483
491
LLVL=info memcoin --config /tmp/node1 e-voting scenarioTest --secretkey $sk
484
492
```
485
493
486
- You can also run scenario_test.go, by running in the integration folder this command:
494
+ You can also run scenario_test.go, by running in the integration folder this
495
+ command:
487
496
``` sh
488
497
NNODES=3 go test -v scenario_test.go
489
498
```
@@ -496,7 +505,8 @@ Public key: `adbacd10fdb9822c71025d6d00092b8a4abb5ebcb673d28d863f7c7c5adaddf3`
496
505
Secret key: ` 28912721dfd507e198b31602fb67824856eb5a674c021d49fdccbe52f0234409 `
497
506
498
507
## Run the scenario test with docker
499
- Use the following commands to launch and set up nodes, and start the scenario test with user defined number of nodes.
508
+ Use the following commands to launch and set up nodes, and start the scenario
509
+ test with user defined number of nodes.
500
510
501
511
First build the docker image ` docker build -t node . `
502
512
@@ -509,7 +519,8 @@ Afterwards use the following commands, replace 4 by the desired nb of nodes :
509
519
NNODES=4 KILLNODE=true go test -v -run ^TestScenario$ github.com/dedis/d-voting/integration -count=1
510
520
```
511
521
512
- Here we set KILLNODE=true or false to decide whether kill and restart a node during the election process. By default, it's set to false.
522
+ Here we set KILLNODE=true or false to decide whether kill and restart a node
523
+ during the election process. By default, it's set to false.
513
524
514
525
To end the session, run ` ./kill_test.sh ` .
515
526
0 commit comments