forked from zack-bitcoin/augur-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
custom.py
68 lines (67 loc) · 2.12 KB
/
custom.py
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
"""This is to make magic numbers easier to deal with."""
import multiprocessing, os
import cdecimal
peers = {
'192.241.212.114:8900': {
'port': 8900,
'blacklist': 0,
'lag': 40.0,
'diffLength': '0',
'length': 0,
},
'69.164.196.239:8900': {
'port': 8900,
'blacklist': 0,
'lag': 0.15,
'diffLength': '0',
'length': 0,
},
}
#peers={'192.241.212.114:8900':{'port':8900, 'blacklist':0, 'lag':40.0, 'diffLength':"0", 'length':0},
# '127.0.0.1:8900':{'port': 8900, 'blacklist':0, 'lag':40.0, 'diffLength':"0", 'length':0}}
#'69.164.196.239:8900':{'port': 8900, 'blacklist':0, 'lag':0.15, 'diffLength':"0", 'length':0}}
current_loc=os.path.dirname(os.path.abspath(__file__))
database_name = os.path.join(current_loc, 'DB')
log_file=os.path.join(current_loc, 'log')
port=8900
api_port=8899
database_port=8898
version = "0.0012"
max_key_length=6**4
total_votecoins=6**4
block_reward = 10 ** 5
premine = 5 * 10 ** 6
fee = 10 ** 3
propose_decision_fee = 10 ** 5
create_jury_fee=10**4
jury_vote_fee=500
reveal_jury_vote_fee=500
SVD_consensus_fee=0
buy_shares_fee=10**5
collect_winnings_reward=5*10**4
# Lower limits on what the "time" tag in a block can say.
mmm = 100
# Take the median of this many of the blocks.
# How far back in history do we look when we use statistics to guess at
# the current blocktime and difficulty.
history_length = 400
# This constant is selected such that the 50 most recent blocks count for 1/2 the
# total weight.
inflection = cdecimal.Decimal('0.985')
download_many = 50 # Max number of blocks to request from a peer at the same time.
max_download = 58000
#buy_shares_target='0'*4+'1'+'9'*59
buy_shares_target='0'*3+'1'+'9'*60
blocktime=60
DB = {
'reward_peers_queue':multiprocessing.Queue(),
'suggested_blocks': multiprocessing.Queue(),
'suggested_txs': multiprocessing.Queue(),
'heart_queue': multiprocessing.Queue(),
}
#seconds_per_week=604800
#cycle_length=seconds_per_week/blocktime#cycle_length
cycle_length=40
vote_reveal_length=cycle_length/10
SVD_length=cycle_length/40
voting_length=cycle_length-vote_reveal_length-SVD_length