forked from NillionNetwork/python-examples
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.py
More file actions
42 lines (37 loc) · 815 Bytes
/
config.py
File metadata and controls
42 lines (37 loc) · 815 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
import hashlib
CONFIG = {
"nr_candidates": 2,
"nr_voters": 3,
}
CONFIG_CANDIDATES = ["Dave", "Emma"]
# Alice
CONFIG_PARTY_1 = {
"private_key": hashlib.sha256(b"alice_seed").digest(),
"party_name": "Alice",
"party_role": "Voter0",
"secret_votes": {
"v0_c0": 1,
"v0_c1": 2,
},
}
# Bob and Charlie
CONFIG_N_PARTIES = [
{
"private_key": hashlib.sha256(b"bob_seed").digest(),
"party_name": "Bob",
"party_role": "Voter1",
"secret_votes": {
"v1_c0": 1,
"v1_c1": 2,
},
},
{
"private_key": hashlib.sha256(b"charlie_seed").digest(),
"party_name": "Charlie",
"party_role": "Voter2",
"secret_votes": {
"v2_c0": 2,
"v2_c1": 1,
},
},
]