Skip to content

Commit f101f1a

Browse files
authored
update README with windows instructions (#170)
update README with windows instructions
1 parent 7598c04 commit f101f1a

File tree

1 file changed

+26
-15
lines changed

1 file changed

+26
-15
lines changed

README.md

+26-15
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ associated to its voter on the blockchain.
188188

189189
**3) Shuffle ballots** Once the election is closed by an admin, ballots are
190190
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
192192
integrity of ballots while re-encrypting and changing the order of ballots. At
193193
this stage encrypted ballots cannot be linked back to their voters.
194194

@@ -209,7 +209,7 @@ For a more formal and in-depth overview of the workflow, see the
209209
## Smart contract
210210

211211
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
213213
triggered with transactions. What makes a smart contract special is that its
214214
executions depends on a consensus among blockchain nodes where operations are
215215
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`).
377377

378378
# Setup a simple system with 3 nodes
379379

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
381387

382388
```sh
383389
./runNode.sh -n 3
@@ -395,6 +401,7 @@ From the first terminal sessions, run:
395401
./setupnNode.sh -n 3
396402
```
397403

404+
398405
3: Launch the web backend
399406

400407
```sh
@@ -444,7 +451,8 @@ Then you should be able to run the setup script:
444451
```sh
445452
./setup.sh
446453
```
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:
448456

449457
```sh
450458
./setupnNode.sh -n 3
@@ -462,28 +470,29 @@ rm -rf /tmp/node{1,2,3}
462470
## Automate the previous setup using `tmux`
463471

464472
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.
467475
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`.
470478

471479

472480
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}`).
475483

476484
## Run the scenario test
477485

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:
480488

481489
```sh
482490
sk=28912721dfd507e198b31602fb67824856eb5a674c021d49fdccbe52f0234409
483491
LLVL=info memcoin --config /tmp/node1 e-voting scenarioTest --secretkey $sk
484492
```
485493

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:
487496
```sh
488497
NNODES=3 go test -v scenario_test.go
489498
```
@@ -496,7 +505,8 @@ Public key: `adbacd10fdb9822c71025d6d00092b8a4abb5ebcb673d28d863f7c7c5adaddf3`
496505
Secret key: `28912721dfd507e198b31602fb67824856eb5a674c021d49fdccbe52f0234409`
497506

498507
## 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.
500510

501511
First build the docker image `docker build -t node .`
502512

@@ -509,7 +519,8 @@ Afterwards use the following commands, replace 4 by the desired nb of nodes :
509519
NNODES=4 KILLNODE=true go test -v -run ^TestScenario$ github.com/dedis/d-voting/integration -count=1
510520
```
511521

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.
513524

514525
To end the session, run `./kill_test.sh`.
515526

0 commit comments

Comments
 (0)