Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
algorand
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nilak
algorand
Commits
ee00ede0
Commit
ee00ede0
authored
May 01, 2019
by
THAKARE AKSHAY HARIBHAU
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sharing the bugs
parent
e9c5f051
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
180 additions
and
212 deletions
+180
-212
Config.py
Config.py
+5
-3
Links1.dat
Links1.dat
+70
-111
Network.py
Network.py
+2
-2
Node.py
Node.py
+1
-1
OverlayNode.py
OverlayNode.py
+98
-94
Utility.py
Utility.py
+3
-0
filegen.py
filegen.py
+1
-1
No files found.
Config.py
View file @
ee00ede0
lambda_proposer
=
3
# wait time for priority messages to be received
lambda_proposer
=
3
0
# wait time for priority messages to be received
tou_proposer
=
20
# proposer rolecount
ROLE_BLOCK_PROPOSER
=
'BLOCK_PROPOSER'
tou_step
=
3
# tou is expected number of users that sortition selects for committee
ROLE_COMMITEE_FOR_VOTE
=
'committee'
lambda_block
=
30
#seconds
lambda_step
=
3
lambda_block
=
30
0
#seconds
lambda_step
=
3
0
BLOCK_PROPOSAL_MSG_type
=
'BLOCK_PROPOSAL_MSGs'
...
...
@@ -15,3 +15,5 @@ COMMITTEE_VOTE_MSG_type = "COMMITTEE_VOTE"
TIMEOUT
=
"TIMEOUT"
T
=
2
/
3
# T isa a fraction of expected committee size that defines BA*`s voting thershold
NUMBER_OF_NODES_IN_NETWORK
=
50
Links1.dat
View file @
ee00ede0
0 20
0 34
0 35
0 42
0 48
1 7
1 18
1 23
1 34
2 15
2 26
3 7
3 18
3 27
3 29
3 34
3 41
3 46
4 9
4 17
4 25
4 38
4 45
4 49
5 21
5 30
5 34
5 47
6 7
6 9
6 47
7 16
7 19
8 14
8 22
8 25
9 16
9 31
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
0 21
0 39
1 32
1 29
2 34
2 44
3 16
3 25
3 42
3 35
4 18
4 37
4 43
4 30
5 37
5 11
5 23
6 41
6 46
7 14
7 47
7 28
8 15
8 44
8 35
9 27
9 46
9 13
9 49
10 27
10 48
10 35
11 29
11 23
12 22
12 42
13 26
13 33
14 24
14 36
14 48
15 19
15 26
15 32
15 37
15 38
14 27
14 39
15 40
16 25
16 36
16 46
17 25
17 29
17 47
18 25
18 47
19 23
19 24
19 33
19 37
20 21
20 28
20 32
20 36
20 44
20 48
23 27
23 39
23 40
25 32
25 40
25 42
25 49
27 43
27 47
28 33
28 43
29 44
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
16 22
16 40
16 42
17 23
17 45
18 48
19 27
19 31
20 46
20 45
20 38
21 24
21 37
21 30
23 42
25 29
26 41
28 34
29 49
30 31
30 38
31 36
31 34
32 35
32 39
33 47
36 43
37 38
39 47
40 47
41 46
41 47
41 49
43 46
43 47
44 48
47 48
Network.py
View file @
ee00ede0
...
...
@@ -8,7 +8,7 @@ import random
from
numpy.random
import
randint
logger
=
logging
.
getLogger
(
__name__
)
import
numpy
as
np
import
Config
class
Network
():
...
...
@@ -31,7 +31,7 @@ class Network():
: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
)
i
=
0
with
open
(
'Nodes1.dat'
,
'r'
)
as
f
:
...
...
Node.py
View file @
ee00ede0
...
...
@@ -101,7 +101,7 @@ class Node(SystemEntity):
# 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
self
.
processMessage
(
message
[
0
],
list
(
message
[
1
]))
# message : (time,(payload))
self
.
logger
.
info
(
"received : "
+
str
(
message
))
#
self.logger.info("received : "+str(message))
self
.
dequeMessage
()
# check if main ba* has to be resumed or not
...
...
OverlayNode.py
View file @
ee00ede0
This diff is collapsed.
Click to expand it.
Utility.py
View file @
ee00ede0
...
...
@@ -133,6 +133,9 @@ def verifySort(pk,hash,proof,seed,rolecount,role,w,badaW):
break
j
=
j
+
1
if
j
:
print
(
"Verification success : J :"
,
j
,
role
)
return
j
# def computeRange():
...
...
filegen.py
View file @
ee00ede0
...
...
@@ -3,7 +3,7 @@ from numpy.random import randint
import
sys
import
networkx
as
nx
from
networkx.algorithms
import
community
import
numpy
'''
Generates a file of nodes
'''
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment