Author

Topic: Stratum-Mining Problem (Read 1523 times)

legendary
Activity: 986
Merit: 1027
Miner-Control.de Pooler
April 25, 2014, 01:15:41 PM
#4
Moin,

ich habe den stratum-mining nun zum laufen bekommen und schon einige Coins minen können.

Zwar nur TEA Coins, aber da war die Diff so niedrig das man schnell sehen konnte, ob es klappt.
Dabei ist mir aber aufgefallen das ca. 50%-60% der "BLOCK Found" Shares verloren gehen.

Dabei ist mir noch eine Error Message aufgefallen, die ab und zu mal kommt:
Code:
ERROR protocol protocol.process_failure # [Failure instance: Traceback: : DB_None instance has no attribute 'update_worker_diff'
/home/pi/stratum/stratum/protocol.py:192:dataReceived
/home/pi/stratum/stratum/protocol.py:238:lineReceived
/home/pi/stratum/stratum/services.py:13:_handle_event
/home/pi/stratum/stratum/services.py:81:call
--- ---
/usr/lib/python2.7/dist-packages/twisted/internet/defer.py:134:maybeDeferred
/home/pi/stratum/stratum/services.py:78:_run
/home/pi/stratum-mining/mining/service.py:166:submit
/home/pi/stratum-mining/mining/basic_share_limiter.py:180:submit
/home/pi/stratum-mining/mining/DBInterface.py:222:update_worker_diff
]
None

Weiß jemand was das bedeutet?


Es ist mir nicht möglich Blöcke an die Windows Wallet zu senden.
Anscheint kennt die Wallet submitblock nicht. Ich bekomme immer "Block decode failed" wenn ich es in der Console manuell eintrage,

Wenn ich es gemint habe bekomme ich ein "Error: 500 Internal Server Error"

Code:
2014-04-25 20:18:39,266 INFO template_registry template_registry.submit_share # Yay, share with diff above 100000
2014-04-25 20:18:39,270 INFO template_registry template_registry.submit_share # We found a block candidate! 0000000000001bf94840880b3fc8131a01757472ace39558387d3b2014530879
2014-04-25 20:18:39,279 DEBUG bitcoin_rpc bitcoin_rpc.submitblock # Submitting Block with submitblock: attempt #1
2014-04-25 20:18:39,282 DEBUG bitcoin_rpc bitcoin_rpc.submitblock # ['0400000016366f4451039adf8f79e329bad9857aba0c5c92c151360a36190000000000000588c8ffab296d418dce0485a2a8a64cf44384b7ac8e85b9c4968ee85f09e1f3b6a75a534b64281aeaa84a4f0101000000f8a65a53010000000000000000000000000000000000000000000000000000000000000000ffffffff2703752202062f503253482f04faa65a5308f8000001640000000d2f7374726174756d506f6f6c2f000000000000000002000000002321031bd61e337e8d6e4d7a7e5efdba6682827995638884a1473b21adcb61f9719d1cac0000000000']
2014-04-25 20:18:39,294 DEBUG interfaces interfaces.on_submit_share # 0000000000001bf94840880b3fc8131a01757472ace39558387d3b2014530879 (599739) valid DJSpAcEDeViL
2014-04-25 20:18:39,299 DEBUG protocol protocol.writeJsonResponse # < {"error": null, "id": 31223, "result": true}
2014-04-25 20:18:39,338 DEBUG bitcoin_rpc bitcoin_rpc.submitblock # Submitting Block with submitblock: attempt #2
2014-04-25 20:18:39,342 DEBUG bitcoin_rpc bitcoin_rpc.submitblock # ['0400000016366f4451039adf8f79e329bad9857aba0c5c92c151360a36190000000000000588c8ffab296d418dce0485a2a8a64cf44384b7ac8e85b9c4968ee85f09e1f3b6a75a534b64281aeaa84a4f0101000000f8a65a53010000000000000000000000000000000000000000000000000000000000000000ffffffff2703752202062f503253482f04faa65a5308f8000001640000000d2f7374726174756d506f6f6c2f000000000000000002000000002321031bd61e337e8d6e4d7a7e5efdba6682827995638884a1473b21adcb61f9719d1cac0000000000']
2014-04-25 20:18:39,355 DEBUG block_template block_template.__init__ # Got To  Block_template.py
2014-04-25 20:18:39,358 DEBUG block_template block_template.__init__ # Got To Block_template.py
2014-04-25 20:18:39,362 DEBUG coinbasetx coinbasetx.__init__ # Got to CoinBaseTX
2014-04-25 20:18:39,367 INFO template_registry template_registry._update_block # None
2014-04-25 20:18:39,371 INFO template_registry template_registry.add_template # New template for 00000000000019360a3651c1925c0cba7a85d9ba29e3798fdf9a0351446f3616
2014-04-25 20:18:39,374 DEBUG template_registry template_registry.get_last_broadcast_args # Getting Laat Template
2014-04-25 20:18:39,379 DEBUG protocol protocol.writeJsonRequest # < {"params": ["3f1", "446f3616df9a035129e3798f7a85d9ba925c0cba0a3651c10000193600000000", "01000000fca65a53010000000000000000000000000000000000000000000000000000000000000000ffffffff2703752202062f503253482f04ffa65a5308", "0d2f7374726174756d506f6f6c2f000000000000000002000000002321031bd61e337e8d6e4d7a7e5efdba6682827995638884a1473b21adcb61f9719d1cac00000000", [], "00000004", "1a28644b", "535aa6fc", false], "id": null, "method": "mining.notify"}
2014-04-25 20:18:39,383 INFO subscription subscription.on_template # BROADCASTED to 1 connections in 0.008 sec
2014-04-25 20:18:39,386 INFO template_registry template_registry._update_block # Update finished, 0.031 sec, 1 txes
2014-04-25 20:18:39,410 DEBUG bitcoin_rpc bitcoin_rpc.submitblock # Submitting Block with submitblock: attempt #3
2014-04-25 20:18:39,413 DEBUG bitcoin_rpc bitcoin_rpc.submitblock # ['0400000016366f4451039adf8f79e329bad9857aba0c5c92c151360a36190000000000000588c8ffab296d418dce0485a2a8a64cf44384b7ac8e85b9c4968ee85f09e1f3b6a75a534b64281aeaa84a4f0101000000f8a65a53010000000000000000000000000000000000000000000000000000000000000000ffffffff2703752202062f503253482f04faa65a5308f8000001640000000d2f7374726174756d506f6f6c2f000000000000000002000000002321031bd61e337e8d6e4d7a7e5efdba6682827995638884a1473b21adcb61f9719d1cac0000000000']
2014-04-25 20:18:39,447 DEBUG bitcoin_rpc bitcoin_rpc.submitblock # Submitting Block with submitblock: attempt #4
2014-04-25 20:18:39,450 DEBUG bitcoin_rpc bitcoin_rpc.submitblock # ['0400000016366f4451039adf8f79e329bad9857aba0c5c92c151360a36190000000000000588c8ffab296d418dce0485a2a8a64cf44384b7ac8e85b9c4968ee85f09e1f3b6a75a534b64281aeaa84a4f0101000000f8a65a53010000000000000000000000000000000000000000000000000000000000000000ffffffff2703752202062f503253482f04faa65a5308f8000001640000000d2f7374726174756d506f6f6c2f000000000000000002000000002321031bd61e337e8d6e4d7a7e5efdba6682827995638884a1473b21adcb61f9719d1cac0000000000']
2014-04-25 20:18:39,485 DEBUG bitcoin_rpc bitcoin_rpc.submitblock # Submitting Block with submitblock: attempt #5
2014-04-25 20:18:39,488 DEBUG bitcoin_rpc bitcoin_rpc.submitblock # ['0400000016366f4451039adf8f79e329bad9857aba0c5c92c151360a36190000000000000588c8ffab296d418dce0485a2a8a64cf44384b7ac8e85b9c4968ee85f09e1f3b6a75a534b64281aeaa84a4f0101000000f8a65a53010000000000000000000000000000000000000000000000000000000000000000ffffffff2703752202062f503253482f04faa65a5308f8000001640000000d2f7374726174756d506f6f6c2f000000000000000002000000002321031bd61e337e8d6e4d7a7e5efdba6682827995638884a1473b21adcb61f9719d1cac0000000000']
2014-04-25 20:18:39,524 ERROR bitcoin_rpc bitcoin_rpc.submitblock # submitblock failed. Problem Submitting block 500 Internal Server Error
Traceback (most recent call last):
  File "/home/pi/stratum-mining/lib/bitcoin_rpc.py", line 74, in submitblock
    resp = (yield self._call('submitblock', [block_hex,]))
Error: 500 Internal Server Error
2014-04-25 20:18:39,536 ERROR bitcoin_rpc bitcoin_rpc.submitblock # Try Enabling TX Messages in config.py!
Traceback (most recent call last):
  File "/home/pi/stratum-mining/lib/bitcoin_rpc.py", line 74, in submitblock
    resp = (yield self._call('submitblock', [block_hex,]))
Error: 500 Internal Server Error
2014-04-25 20:18:39+0200 [HTTPPageGetter,client] Unhandled error in Deferred:
2014-04-25 20:18:39+0200 [HTTPPageGetter,client] Unhandled Error
        Traceback (most recent call last):
        Failure: twisted.web.error.Error: 500 Internal Server Error


Ich habe den Block mal hier im Post etwas abgeändert. Ich glaube zwar nicht das ich ihn noch senden kann, aber man weiß ja nie.
legendary
Activity: 986
Merit: 1027
Miner-Control.de Pooler
April 24, 2014, 01:00:18 PM
#3
Also ich habe, in Bezug auf "Long-Poll" beim Solo-Mining einfach einen Fall-Back-Pool eingefügt der LP & Stratum unterstützt.
Dann ging es für mich, wobei mein Augenmerk wie gesagt auf dem LP lag.

Ist vllt. ein Versuch wert.

Gruß Carsten.

Danke für die Antwort. Steh gerade bisschen aufm Schlauch. Wie meinste das. Einfach in der Config etwas umstellen?

Hab jetzt nur so was gefunden in der Config:

COINDAEMON_ALGO = 'sha256d'
COINDAEMON_TX = 'yes'

Das hier ist meine Config:

Code:
'''
This is example configuration for Stratum server.
Please rename it to config.py and fill correct values.

This is already setup with sane values for solomining.
You NEED to set the parameters in BASIC SETTINGS
'''

# ******************** BASIC SETTINGS ***************
# These are the MUST BE SET parameters!

#eMark
CENTRAL_WALLET = 'NdB7DpsLhYMEP8WqPpQ2YMedkS3nRQTJfQ'                # Local coin address where money goes
#FFC
#CENTRAL_WALLET = 'FsGS7CFhNX8RNhq47rNjCDcCzaKgbUqtaa'                # Local coin address where money goes

COINDAEMON_TRUSTED_HOST = '192.168.0.14'
COINDAEMON_TRUSTED_PORT = 6666
COINDAEMON_TRUSTED_USER = 'DJSpAcEDeViL'
COINDAEMON_TRUSTED_PASSWORD = 'HoTTi-Wallet'

# Coin algorithm is the option used to determine the algorithm used by stratum
# This currently works with POW and POS coins
# The available options are:
# scrypt, sha256d, scrypt-jane, skeinhash, quark and riecoin
# If the option does not meet either of these criteria stratum defaults to scrypt
# For Coins which support TX Messages please enter yes in the TX selection
COINDAEMON_ALGO = 'sha256d'
COINDAEMON_TX = 'yes'

# ******************** BASIC SETTINGS ***************
# Backup Coin Daemon address's (consider having at least 1 backup)
# You can have up to 99

#COINDAEMON_TRUSTED_HOST_1 = 'localhost'
#COINDAEMON_TRUSTED_PORT_1 = 28332
#COINDAEMON_TRUSTED_USER_1 = 'user'
#COINDAEMON_TRUSTED_PASSWORD_1 = 'somepassword'

#COINDAEMON_TRUSTED_HOST_2 = 'localhost'
#COINDAEMON_TRUSTED_PORT_2 = 28332
#COINDAEMON_TRUSTED_USER_2 = 'user'
#COINDAEMON_TRUSTED_PASSWORD_2 = 'somepassword'

# ******************** GENERAL SETTINGS ***************
# Set process name of twistd, much more comfortable if you run multiple processes on one machine
STRATUM_MINING_PROCESS_NAME= 'twistd-stratum-mining'


# Enable some verbose debug (logging requests and responses).
DEBUG = True

# Destination for application logs, files rotated once per day.
LOGDIR = 'log/'

# Main application log file.
LOGFILE = None      # eg. 'stratum.log'
LOGLEVEL = 'DEBUG'
# Logging Rotation can be enabled with the following settings
# It if not enabled here, you can set up logrotate to rotate the files.
# For built in log rotation set LOG_ROTATION = True and configure the variables
LOG_ROTATION = True
LOG_SIZE = 10485760 # Rotate every 10M
LOG_RETENTION = 10 # Keep 10 Logs

# How many threads use for synchronous methods (services).
# 30 is enough for small installation, for real usage
# it should be slightly more, say 100-300.
THREAD_POOL_SIZE = 300

# ******************** TRANSPORTS *********************
# Hostname or external IP to expose
HOSTNAME = '192.168.0.40'

# Disable the example service
ENABLE_EXAMPLE_SERVICE = False

# Port used for Socket transport. Use 'None' for disabling the transport.
LISTEN_SOCKET_TRANSPORT = 3333
# Port used for HTTP Poll transport. Use 'None' for disabling the transport
LISTEN_HTTP_TRANSPORT = None
# Port used for HTTPS Poll transport
LISTEN_HTTPS_TRANSPORT = None
# Port used for WebSocket transport, 'None' for disabling WS
LISTEN_WS_TRANSPORT = None
# Port used for secure WebSocket, 'None' for disabling WSS
LISTEN_WSS_TRANSPORT = None

# Salt used for Block Notify Password
PASSWORD_SALT = 'some_crazy_string_here'

# ******************** Database  *********************
DATABASE_DRIVER = 'none'       # Options: none, sqlite, postgresql or mysql
DATABASE_EXTEND = True         # SQLite and PGSQL Only!

# SQLite
DB_SQLITE_FILE = '/var/www/sq_db/cgminer'
# Postgresql
DB_PGSQL_HOST = 'localhost'
DB_PGSQL_DBNAME = 'pooldb'
DB_PGSQL_USER = 'goesi_admin'
DB_PGSQL_PASS = 'goesi_admin'
DB_PGSQL_SCHEMA = 'public'
# MySQL
DB_MYSQL_HOST = 'localhost'
DB_MYSQL_DBNAME = 'pooldb'
DB_MYSQL_USER = 'pooldb'
DB_MYSQL_PASS = '**empty**'
DB_MYSQL_PORT = 3306            # Default port for MySQL

# ******************** Adv. DB Settings *********************
#  Don't change these unless you know what you are doing

DB_LOADER_CHECKTIME = 15        # How often we check to see if we should run the loader
DB_LOADER_REC_MIN = 10          # Min Records before the bulk loader fires
DB_LOADER_REC_MAX = 50          # Max Records the bulk loader will commit at a time
DB_LOADER_FORCE_TIME = 300      # How often the cache should be flushed into the DB regardless of size.
DB_STATS_AVG_TIME = 300         # When using the DATABASE_EXTEND option, average speed over X sec
                                # Note: this is also how often it updates
DB_USERCACHE_TIME = 600         # How long the usercache is good for before we refresh

# ******************** Pool Settings *********************

# User Auth Options
USERS_AUTOADD = True           # Automatically add users to database when they connect.
                                # This basically disables User Auth for the pool.
USERS_CHECK_PASSWORD = False    # Check the workers password? (Many pools don't)

# Transaction Settings
COINBASE_EXTRAS = '/stratumPool/'           # Extra Descriptive String to incorporate in solved blocks
ALLOW_NONLOCAL_WALLET = True              # Allow valid, but NON-Local wallet's

# Coin Daemon communication polling settings (In Seconds)
PREVHASH_REFRESH_INTERVAL = 5   # How often to check for new Blocks
                                #   If using the blocknotify script (recommended) set = to MERKLE_REFRESH_INTERVAL
                                #   (No reason to poll if we're getting pushed notifications)
MERKLE_REFRESH_INTERVAL = 30    # How often check memorypool
                                #   This effectively resets the template and incorporates new transactions.
                                #   This should be "slow"

INSTANCE_ID = 31                # Used for extranonce and needs to be 0-31

# ******************** 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 = 32                 # 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 = 16           # Minimum target difficulty
VDIFF_MAX_TARGET = 1024         # Maximum target difficulty
VDIFF_TARGET_TIME = 15          # Target time per share (i.e. try to get 1 share per this many seconds)
VDIFF_RETARGET_TIME = 120       # Check to see if we should retarget this often
VDIFF_VARIANCE_PERCENT = 30     # Allow average time to very this % from target without retarget

# Allow external setting of worker difficulty, checks pool_worker table datarow[6] position for target difficulty
# if present or else defaults to pool target, over rides all other difficulty settings, no checks are made
# for min or max limits this should be done by your front end software
ALLOW_EXTERNAL_DIFFICULTY = False

#### Advanced Option #####
# For backwards compatibility, we send the scrypt hash to the solutions column in the shares table
# For block confirmation, we have an option to send the block hash in
# Please make sure your front end is compatible with the block hash in the solutions table.
# For People using the MPOS frontend enabling this is recommended. It allows the frontend to compare the block hash to the coin daemon reducing the likelihood of missing share error's for blocks
SOLUTION_BLOCK_HASH = True      # If enabled, enter the block hash. If false enter the scrypt/sha hash into the shares table

#Pass scrypt hash to submit block check.
#Use if submit block is returning errors and marking submitted blocks invalid upstream, but the submitted blocks are being a accepted by the coin daemon into the block chain.
BLOCK_CHECK_SCRYPT_HASH = True

# ******************** Worker Ban Options *********************
ENABLE_WORKER_BANNING = True    # Enable/disable temporary worker banning
WORKER_CACHE_TIME = 600         # How long the worker stats cache is good before we check and refresh
WORKER_BAN_TIME = 300           # How long we temporarily ban worker
INVALID_SHARES_PERCENT = 50     # Allow average invalid shares vary this % before we ban

# ******************** E-Mail Notification Settings *********************
NOTIFY_EMAIL_TO = '[email protected]'                      # Where to send Start/Found block notifications
NOTIFY_EMAIL_TO_DEADMINER = ''                                  # Where to send dead miner notifications
NOTIFY_EMAIL_FROM = 'root@localhost'                            # Sender address
NOTIFY_EMAIL_SERVER = 'localhost'                               # E-Mail sender
NOTIFY_EMAIL_USERNAME = ''                                      # E-Mail server SMTP logon
NOTIFY_EMAIL_PASSWORD = ''
NOTIFY_EMAIL_USETLS = True

# ******************** Memcache Settings *********************
# Memcahce is a requirement. Enter the settings below
MEMCACHE_HOST = "localhost"     # Hostname or IP that runs memcached
MEMCACHE_PORT = 11211           # Port
MEMCACHE_TIMEOUT = 900          # Key timeout
MEMCACHE_PREFIX = "stratum_"    # Prefix for keys

legendary
Activity: 1372
Merit: 1000
CTO für den Bundesverband Bitcoin e. V.
April 24, 2014, 12:23:24 PM
#2
Also ich habe, in Bezug auf "Long-Poll" beim Solo-Mining einfach einen Fall-Back-Pool eingefügt der LP & Stratum unterstützt.
Dann ging es für mich, wobei mein Augenmerk wie gesagt auf dem LP lag.

Ist vllt. ein Versuch wert.

Gruß Carsten.
legendary
Activity: 986
Merit: 1027
Miner-Control.de Pooler
April 24, 2014, 12:07:52 PM
#1
Moin zusammen.

Ich habe auf meinem Pi das Stratum-Mining installiert und wollte dies nutzen um mit der eMark Wallet zu minen.

Alles schön und gut, nachdem ich das python Script aus laufen gebracht habe, habe ich nun das Problem das gefundene Blocks nicht an die Wallet gesendet werden können oder abgelehnt werden.

https://github.com/Crypto-Expert/stratum-mining

bitcoin_rpc # Problem Submitting block 500 Internal Server Error
Traceback (most recent call last):
  File "stratum-mining/lib/bitcoin_rpc.py", line 49, in submitblock
    resp = (yield self._call('getblocktemplate', [{'mode': 'submit', 'data': block_hex}]))
Error: 500 Internal Server Error


Leider kann ich auch irgendwie kein TestNet mit der eMark Wallet auf machen. Brauche ich dafür irgendwelche besonderen Nodes oder Einstellungen?  Im Netz gibt es dazu leider keine Infos.


Das ziel ist es, das ich über meinem Pi und der Wallet auf meinem Rechner eMarks im Solo-Mining errechnen kann.
Da der CGMiner wohl nur noch Stratum akzeptiert. Bzw. die Hardware die ich verwende nur das Protokoll unterstützt.

Oder kennt jemand eine einfachere Lösung wie man Stratum für die eigene Wallet zum laufen bringt?


Wenn dies alles mal funktioniert, möchte ich für die eMark und auch Bitcoin gerne ein eliguis Pool oder Node auf machen.

Beste Grüße
Jump to: