forked from ahmedbodi/stratum-mining
-
Notifications
You must be signed in to change notification settings - Fork 2
config.py 記述サンプル
nannan7 edited this page Jan 19, 2019
·
4 revisions
config.py 記述サンプル
- 設定ファイルに必要なウォレットアドレスを取得する
vip-cli getaccountaddress ""
表示されたアドレスを下記へ設定
CENTRAL_WALLET = 'set_valid_addresss_in_config!' # Local coin address where money goes
- COINデーモンの情報を下記へ設定
COINDAEMON_TRUSTED_HOST = 'localhost'
COINDAEMON_TRUSTED_PORT = 28332
COINDAEMON_TRUSTED_USER = 'user'
COINDAEMON_TRUSTED_PASSWORD = 'somepassword'
- アルゴリズムは下記固定
COINDAEMON_ALGO = 'sha256d'
COINDAEMON_TX = 'no'
- DEBUGは安定稼働するまでTrue推奨
DEBUG = True
- LOGファイルは取得を推奨
LOGFILE = 'stratum.log' # eg. 'stratum.log'
- stratumがオープンするポートを指定
LISTEN_SOCKET_TRANSPORT = 3333
- 適当な文字列を設定
PASSWORD_SALT = 'some_crazy_string'
- MYSQLの情報を設定
DBNAMEはMPOSで作成済みのDBを指定
DB_MYSQL_HOSTがlocalhost以外の場合はMYSQLのbind-addressを変更するかコメントアウトする事を忘れずに
DB_MYSQL_HOST = 'localhost'
DB_MYSQL_DBNAME = 'pooldb'
DB_MYSQL_USER = 'pooldb'
DB_MYSQL_PASS = '**empty**'
DB_MYSQL_PORT = 3306 # Default port for MySQL
- TRANSACTIONに下記情報が書き込まれるので、プールの名前等を設定する
COINBASE_EXTRAS = '/stratumPool/' # Extra Descriptive String to incorporate in solved blocks
- 新しいBLOCKが存在するか確認する間隔。
あまり長い時間を設定すると、マイナーに空掘りさせる事になるので、短めに。
短くしすぎるとCOINDに負荷がかかります。
PREVHASH_REFRESH_INTERVAL = 5 # How often to check for new Blocks
- 自分のプールにあわせて調整する。管理者の腕の見せ所
VDIFF_MIN_CHANGEの項目が抜けていたので追加してください。
# ******************** Pool Difficulty Settings *********************
VDIFF_X2_TYPE = True # Powers of 2 e.g. 2,4,8,16,32,64,128,256,512,1024
VDIFF_FLOAT = False # Use float difficulty
# Pool Target (Base Difficulty)
POOL_TARGET = 1 # Pool-wide difficulty target int >= 1
# Variable Difficulty Enable
VARIABLE_DIFF = True # Master variable difficulty enable
# Variable diff tuning variables
#VARDIFF will start at the POOL_TARGET. It can go as low as the VDIFF_MIN and as high as min(VDIFF_MAX or coindaemons difficulty)
USE_COINDAEMON_DIFF = False # Set the maximum difficulty to the coindaemon difficulty.
DIFF_UPDATE_FREQUENCY = 86400 # Update the coindaemon difficulty once a day for the VARDIFF maximum
VDIFF_MIN_TARGET = 0.01 # Minimum target difficulty
VDIFF_MAX_TARGET = 16 # Maximum target difficulty
VDIFF_MIN_CHANGE = 0.1 # Minimum change of worker's difficulty if VDIFF_X2_TYPE=False and the final difficulty will be within the boundaries (VDIFF_MIN_TARGET, VDIFF_MAX_TARGET)
VDIFF_TARGET_TIME = 10 # Target time per share (i.e. try to get 1 share per this many seconds)
VDIFF_RETARGET_TIME = 60 # Check to see if we should retarget this often
VDIFF_VARIANCE_PERCENT = 30 # Allow average time to very this % from target without retarget