sharing the bugs

parent e9c5f051
lambda_proposer = 3 # wait time for priority messages to be received lambda_proposer = 30# wait time for priority messages to be received
tou_proposer = 20 # proposer rolecount tou_proposer = 20 # proposer rolecount
ROLE_BLOCK_PROPOSER = 'BLOCK_PROPOSER' ROLE_BLOCK_PROPOSER = 'BLOCK_PROPOSER'
tou_step = 3 # tou is expected number of users that sortition selects for committee tou_step = 3 # tou is expected number of users that sortition selects for committee
ROLE_COMMITEE_FOR_VOTE = 'committee' ROLE_COMMITEE_FOR_VOTE = 'committee'
lambda_block = 30 #seconds lambda_block = 300 #seconds
lambda_step = 3 lambda_step = 30
BLOCK_PROPOSAL_MSG_type = 'BLOCK_PROPOSAL_MSGs' BLOCK_PROPOSAL_MSG_type = 'BLOCK_PROPOSAL_MSGs'
...@@ -15,3 +15,5 @@ COMMITTEE_VOTE_MSG_type = "COMMITTEE_VOTE" ...@@ -15,3 +15,5 @@ COMMITTEE_VOTE_MSG_type = "COMMITTEE_VOTE"
TIMEOUT = "TIMEOUT" TIMEOUT = "TIMEOUT"
T = 2/3 # T isa a fraction of expected committee size that defines BA*`s voting thershold T = 2/3 # T isa a fraction of expected committee size that defines BA*`s voting thershold
NUMBER_OF_NODES_IN_NETWORK = 50
0 20 0 21
0 34 0 39
0 35 1 32
0 42 1 29
0 48 2 34
1 7 2 44
1 18 3 16
1 23 3 25
1 34 3 42
2 15 3 35
2 26 4 18
3 7 4 37
3 18 4 43
3 27 4 30
3 29 5 37
3 34 5 11
3 41 5 23
3 46 6 41
4 9 6 46
4 17 7 14
4 25 7 47
4 38 7 28
4 45 8 15
4 49 8 44
5 21 8 35
5 30 9 27
5 34 9 46
5 47 9 13
6 7 9 49
6 9 10 27
6 47 10 48
7 16 10 35
7 19 11 29
8 14 11 23
8 22 12 22
8 25 12 42
9 16 13 26
9 31 13 33
9 41
9 44
10 36
10 39
11 13
11 17
11 34
11 39
11 43
12 15
12 17
12 21
12 30
12 35
13 14
13 15
14 17
14 24 14 24
14 36 14 27
14 48 14 39
15 19
15 26
15 32
15 37
15 38
15 40 15 40
16 25 16 22
16 36 16 40
16 46 16 42
17 25 17 23
17 29 17 45
17 47 18 48
18 25 19 27
18 47 19 31
19 23 20 46
19 24 20 45
19 33 20 38
19 37 21 24
20 21 21 37
20 28 21 30
20 32 23 42
20 36 25 29
20 44 26 41
20 48 28 34
23 27 29 49
23 39 30 31
23 40 30 38
25 32 31 36
25 40 31 34
25 42 32 35
25 49 32 39
27 43 33 47
27 47 36 43
28 33 37 38
28 43 39 47
29 44 40 47
30 47
30 48
31 35
31 41
32 34
32 38
32 40
32 41
32 43
33 44
34 37
34 41
34 46
37 39
41 46 41 46
41 47
41 49 41 49
43 46
43 47
44 48
47 48
...@@ -8,7 +8,7 @@ import random ...@@ -8,7 +8,7 @@ import random
from numpy.random import randint from numpy.random import randint
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
import numpy as np import numpy as np
import Config
class Network(): class Network():
...@@ -31,7 +31,7 @@ class Network(): ...@@ -31,7 +31,7 @@ class Network():
:return: :return:
''' '''
w = randint(1, 51, 4) # 51 is excluded - range (1,50) w = randint(1, 51, Config.NUMBER_OF_NODES_IN_NETWORK) # 51 is excluded - range (1,50)
self.badaW = np.sum(w) self.badaW = np.sum(w)
i = 0 i = 0
with open('Nodes1.dat', 'r') as f: with open('Nodes1.dat', 'r') as f:
......
...@@ -101,7 +101,7 @@ class Node(SystemEntity): ...@@ -101,7 +101,7 @@ class Node(SystemEntity):
# generate tasks for todolist based on messges # generate tasks for todolist based on messges
for message in list(self.messageQueue): #this creates adupliacte list and iterate over it while making changes to original queue for message in list(self.messageQueue): #this creates adupliacte list and iterate over it while making changes to original queue
self.processMessage(message[0],list(message[1])) # message : (time,(payload)) self.processMessage(message[0],list(message[1])) # message : (time,(payload))
self.logger.info("received : "+str(message)) # self.logger.info("received : "+str(message))
self.dequeMessage() self.dequeMessage()
# check if main ba* has to be resumed or not # check if main ba* has to be resumed or not
......
This diff is collapsed.
...@@ -133,6 +133,9 @@ def verifySort(pk,hash,proof,seed,rolecount,role,w,badaW): ...@@ -133,6 +133,9 @@ def verifySort(pk,hash,proof,seed,rolecount,role,w,badaW):
break break
j = j+1 j = j+1
if j :
print("Verification success : J :",j,role)
return j return j
# def computeRange(): # def computeRange():
......
...@@ -3,7 +3,7 @@ from numpy.random import randint ...@@ -3,7 +3,7 @@ from numpy.random import randint
import sys import sys
import networkx as nx import networkx as nx
from networkx.algorithms import community from networkx.algorithms import community
import numpy
''' '''
Generates a file of nodes Generates a file of nodes
''' '''
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment