Bitcoin Forum

Alternate cryptocurrencies => Mining (Altcoins) => Topic started by: cryptomind on February 08, 2014, 04:57:31 PM



Title: MAX COIN POOL BOUNTY (help fix stratum-mining) and start new pools!
Post by: cryptomind on February 08, 2014, 04:57:31 PM
Hello,

I started a new MaxCoin Pool (pool.max-coin.net) and everything is ready except one small issue.

All work done by miners is not counted in. The error in the shares table in the database says:

-> Share is above target. Hash: %s

All client shares sent to my stratum are not being accepted.

In a spirit of sharing, and helping us all get more MaxCoin pools for a healthier network, here are the full instructions on how I got the stratum-mining-maxcoin to actually work: http://pastebin.com/NZSKV0vQ

Can someone PLEASE assist.

I think one needs to replace ECDSA with Schnorr signing and use secp256r1 curve over secp256k1 (something I read somewhere on line) - alas I would not know where to begin.

THERE'S A BOUNTY FOR THIS from HashFaster: http://hashfaster.com/maxcoin-stratum-bounty-1-btc/

1BTC to anyone who gets a working public REPO on Git for this.

Please assist!

Thank you!


Title: Re: MAX COIN POOL BOUNTY (help fix stratum-mining) and start new pools!
Post by: archit on February 08, 2014, 05:00:42 PM
Taking a look at it  ;)

EDIT : Damn, it's python!


Title: Re: MAX COIN POOL BOUNTY (help fix stratum-mining) and start new pools!
Post by: cryptomind on February 08, 2014, 05:04:42 PM
Yea it is :)

Here's what I've done to get the stratum-mining-maxcoin actually running on Ubuntu 12.04:


Code:
 
# setting up the environment
        apt-get update
        apt-get upgrade
        apt-get install install git build-essential memcached libmemcached-dev mysql-client python-twisted python-mysqldb python-dev python-setuptools python-memcache python-simplejson python-setuptools postfix
        easy_install -U distribute
      
        # get stratum-mining source code and build (start in home)
        cd ~
 
        # get stratum-mining source
        git clone https://github.com/peconi/stratum-mining-maxcoin.git
        cd stratum-mining-maxcoin
        git submodule init
        git submodule update
        git submodule foreach git pull origin master
        cd externals/maxcoin-hash/
        python setup.py install
 
        cd ../python-sha3
        git clone https://github.com/peconi/python-sha3.git . ## <— note a . at the end
        python setup.py install
 
        cd ../stratum
        git clone https://github.com/peconi/stratum.git . ## <— note a . at the end
        python setup.py install
      
        cd ../../ # <— exit back to  stratum-mining-maxcoin path
      
        cp conf/config_sample.py conf/config.py
      
        # edit the config file and change some settings
        nano conf/config.py
 
                CENTRAL_WALLET = ‘<your wallet id>’
                COINDAEMON_TRUSTED_HOST = ’<your maxcoind host>’
                COINDAEMON_TRUSTED_PORT = 8669
                COINDAEMON_TRUSTED_USER = ‘maxcoinrpc’
                COINDAEMON_TRUSTED_PASSWORD = ‘<your rpc password>’
 
                COINDAEMON_ALGO = 'keccak'
                COINDAEMON_TX = 'no'
 
                HOSTNAME = '<or ip address of this host?'
 
                PASSWORD_SALT = ‘<password salt>’
 
                DB_MYSQL_HOST = '<your db host>'
                DB_MYSQL_DBNAME = 'pooldb'
                DB_MYSQL_USER = 'pooldb'
                DB_MYSQL_PASS = '<your db pass>'
              
                POOL_TARGET = 16
 
                SOLUTION_BLOCK_HASH = True
              
                # Recommended to set as well
                NOTIFY_EMAIL_TO = ''                                    # 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 = False             # Change to true if not local server
 
        # install pylib
        easy_install pylibmc
      
        # edit python file
        nano /usr/local/lib/python2.7/dist-packages/stratum-*-py2.7.egg/stratum/websocket_transport.py
 
        # replace: from autobahn.websocket import WebSocketServerProtocol, WebSocketServerFactory
        # with: from autobahn.twisted.websocket import WebSocketServerProtocol, WebSocketServerFactory
        # if found!
      
        # import this stratum DB structure
        # found at https://github.com/peconi/stratum-mining-litecoin/blob/master/sql/stratum_default_layout.sql
        mysql -h <db host> -upooldb pooldb < [sql file you got on the link above] -p
 
        # make sure you’re in stratum-mining-maxcoin folder and run the stratum
        twistd -ny launcher.tac # <— if debugging
        or
        twistd -y launcher.tac # <— if demonized (production)

Alas - the errors when I look at shares DB in the database show this:

Code:
*************************** 593. row ***************************
             id: 593
       rem_host: 210.86.28.6
       username: user.worker2
     our_result: N
upstream_result: N
         reason: Share is above target. Hash: %s
       solution: 0
     difficulty: 16
           time: 2014-02-08 03:56:37

It seems that a good number of other pools figured this out, however, none of them are sharing any info...

Looking at you RocketPool!


Title: Re: MAX COIN POOL BOUNTY (help fix stratum-mining) and start new pools!
Post by: Surgun on February 08, 2014, 05:10:52 PM
ypool drop support for MaxCoin, lol: https://twitter.com/ypool_net/statuses/432179313102696450


Title: Re: MAX COIN POOL BOUNTY (help fix stratum-mining) and start new pools!
Post by: cryptomind on February 08, 2014, 05:16:56 PM
I started back my stratum server.

If you want to try sending work to it just to test, please just do the following:

minerd -a keccak -o stratum+tcp://stratum01.max-coin.net:3333 -u cryptomind.cloud -p 1 -t1

From the client I get:
Code:
root@ubuntu-1204LTS:~# minerd -a keccak -o stratum+tcp://stratum01.max-coin.net:3333 -u cryptomind.cloud -p 1 -t 1
[2014-02-08 12:22:21] 1 miner threads started, using 'keccak' algorithm.
[2014-02-08 12:22:21] Starting Stratum on stratum+tcp://stratum01.max-coin.net:3333
[2014-02-08 12:22:21] Stratum detected new block
[2014-02-08 12:22:25] thread 0: 2097152 hashes, 749.38 khash/s
[2014-02-08 12:12:56] accepted: 0/1 (0.00%), 600.53 khash/s (booooo)

From the stratum log I get:
Code:
2014-02-08 12:12:51,216 DEBUG bitcoin_rpc_manager # Check Height -- Current Pool 0 : 5598
2014-02-08 12:12:51,259 INFO work_log_pruner # Pruned 0 jobs
2014-02-08 12:12:51,288 DEBUG DB_Mysql # Finding user with id or username of cryptomind.cloud
2014-02-08 12:12:51,289 DEBUG mining # cryptomind.be (0, 0, True, False, 1391880117) 1500.00% work_id(40f) job_id(17) diff(16.000000)
2014-02-08 12:12:51,289 DEBUG DB_Mysql # Setting difficulty for cryptomind.cloud to 16
2014-02-08 12:12:51,293 DEBUG interfaces # False (0) INVALID cryptomind.cloud
2014-02-08 12:12:56,210 INFO block_updater # Checking for new block.
2014-02-08 12:12:56,214 DEBUG block_updater # Next prevhash update in 4.995 sec
2014-02-08 12:12:56,214 DEBUG block_updater # Merkle update in next 44.995 sec
2014-02-08 12:12:56,215 DEBUG bitcoin_rpc_manager # Check Height -- Current Pool 0 : 5598
2014-02-08 12:13:01,210 INFO block_updater # Checking for new block.
2014-02-08 12:13:01,214 DEBUG block_updater # Next prevhash update in 4.996 sec
2014-02-08 12:13:01,214 DEBUG block_updater # Merkle update in next 39.995 sec
2014-02-08 12:13:01,215 DEBUG bitcoin_rpc_manager # Check Height -- Current Pool 0 : 5598


Title: Re: MAX COIN POOL BOUNTY (help fix stratum-mining) and start new pools!
Post by: sippsnapp on February 08, 2014, 05:23:30 PM
People with wrong settings on cudaminer get a huge hashrate, but actually the miner is not mining (GPU load below 20%). Resulting on a pool with millions of invalid shares, Ddosing the db. If a botnet does that or multiple uisers the pools goesdown on I/o put through ---- my humble conclusion.


Title: Re: MAX COIN POOL BOUNTY (help fix stratum-mining) and start new pools!
Post by: cryptomind on February 08, 2014, 05:25:12 PM
I am cpu mining in that example, cpu is being used, however, the shares are getting rejected...

DEBUG mining # cryptomind.be (0, 0, True, False, 1391880117) 1500.00% work_id(40f) job_id(17) diff(16.000000)

...


Title: Re: MAX COIN POOL BOUNTY (help fix stratum-mining) and start new pools!
Post by: Surgun on February 08, 2014, 05:31:37 PM
Taking a look at it  ;)

EDIT : Damn, it's python!

do this in ruby ;)


Title: Re: MAX COIN POOL BOUNTY (help fix stratum-mining) and start new pools!
Post by: maxcoinproject on February 08, 2014, 05:32:35 PM
We've heard from the guys with pools up & running that they have pushed their source to: https://github.com/Crypto-Expert/stratum-mining/tree/maxcoin. Hopefully you guys can use this to get some more online.


Title: Re: MAX COIN POOL BOUNTY (help fix stratum-mining) and start new pools!
Post by: Surgun on February 08, 2014, 05:46:26 PM
for right stratum do this:
git clone https://github.com/Crypto-Expert/stratum-mining.git
cd stratum-mining
git checkout maxcoin
update_submodules
cd externals/maxcoin-hash-python
python setup.py install
cd ../stratum
python setup.py install


Title: Re: MAX COIN POOL BOUNTY (help fix stratum-mining) and start new pools!
Post by: cryptomind on February 08, 2014, 07:30:37 PM
Deploying https://github.com/Crypto-Expert/stratum-mining/tree/maxcoin rite now. Will let you guys know how it works.


Title: Re: MAX COIN POOL BOUNTY (help fix stratum-mining) and start new pools!
Post by: cryptomind on February 08, 2014, 07:55:47 PM
Probably a single step away from solution:

Code:
2014-02-08 14:55:00,059 INFO mining # MINING SERVICE IS READY
2014-02-08 14:55:00-0500 [HTTPPageGetter,client] 2014-02-08 14:55:00,071 DEBUG stats # Logging initialized
2014-02-08 14:55:00-0500 [HTTPPageGetter,client] 2014-02-08 14:55:00,074 DEBUG protocol # Logging initialized
2014-02-08 14:55:00-0500 [HTTPPageGetter,client] 2014-02-08 14:55:00,075 DEBUG socket_transport # Logging initialized
2014-02-08 14:55:00-0500 [HTTPPageGetter,client] 2014-02-08 14:55:00,076 DEBUG http_transport # Logging initialized
2014-02-08 14:55:00-0500 [HTTPPageGetter,client] 2014-02-08 14:55:00,078 DEBUG irc # Logging initialized
2014-02-08 14:55:00-0500 [HTTPPageGetter,client] Loading of signing key 'None' failed, protocol messages cannot be signed.
2014-02-08 14:55:00-0500 [HTTPPageGetter,client] Cannot initiate SSL context, are SSL_PRIVKEY or SSL_CACERT missing?
2014-02-08 14:55:00-0500 [HTTPPageGetter,client] This will skip all SSL-based transports.
2014-02-08 14:55:00-0500 [HTTPPageGetter,client] SocketTransportFactory starting on 3333
2014-02-08 14:55:00-0500 [HTTPPageGetter,client] Starting factory <stratum.socket_transport.SocketTransportFactory instance at 0x1e55638>
2014-02-08 14:55:00,082 DEBUG block_template # Got To  Block_template.py
2014-02-08 14:55:00,082 DEBUG block_template # Got To Block_template.py
2014-02-08 14:55:00,083 DEBUG coinbasetx # Got to CoinBaseTX
2014-02-08 14:55:00,083 ERROR template_registry # [Failure instance: Traceback: <type 'exceptions.ValueError'>: invalid address
/usr/lib/python2.7/dist-packages/twisted/internet/defer.py:1095:gotResult
/usr/lib/python2.7/dist-packages/twisted/internet/defer.py:1082:_inlineCallbacks
/usr/lib/python2.7/dist-packages/twisted/internet/defer.py:362:callback
/usr/lib/python2.7/dist-packages/twisted/internet/defer.py:458:_startRunCallbacks
--- <exception caught here> ---
/usr/lib/python2.7/dist-packages/twisted/internet/defer.py:545:_runCallbacks
/root/stratum-mining/lib/template_registry.py:142:_update_block
/root/stratum-mining/lib/block_template.py:62:fill_from_rpc
/root/stratum-mining/lib/coinbasetx.py:40:__init__
/root/stratum-mining/lib/coinbaser.py:76:get_script_pubkey
/root/stratum-mining/lib/util.py:218:script_to_address

Any thoughts?


Title: Re: MAX COIN POOL BOUNTY (help fix stratum-mining) and start new pools!
Post by: cryptomind on February 08, 2014, 08:55:17 PM
OK, i I manually added these files (https://github.com/Crypto-Expert/stratum-mining/pull/239) and it works without an error too.

If you guys have miners - please join... I'm getting some hashes now! :)

Thanks


Title: Re: MAX COIN POOL BOUNTY (help fix stratum-mining) and start new pools!
Post by: Surgun on February 08, 2014, 09:12:47 PM
maxcoin. tk is up.


Title: Re: MAX COIN POOL BOUNTY (help fix stratum-mining) and start new pools!
Post by: cryptomind on February 08, 2014, 10:48:30 PM
The only issues left now are:

1) Find a first block, so we know things are working correctly
2) Fix the hash rate display - people are mining at "supposedly" 400GH/s...

If anyone knows what's going on - please share :)

Thanks!


Title: Re: MAX COIN POOL BOUNTY (help fix stratum-mining) and start new pools!
Post by: Alphi on February 19, 2014, 09:32:37 AM
for right stratum do this:
git clone https://github.com/Crypto-Expert/stratum-mining.git
cd stratum-mining
git checkout maxcoin
update_submodules
cd externals/maxcoin-hash-python
python setup.py install
cd ../stratum
python setup.py install

i tried both methods... this one and copying only the modified files... still no luck


I get the following from cgminer 3.7.2 for maxcoin

Rejected 01a3dc72 Diff 1/64 GPU 0  (global name 'sha256' is not

any ideas?

EDIT NVM I found it...

need to update from 'keccak' to


COINDAEMON_ALGO = 'max'

in config.py




Title: Re: MAX COIN POOL BOUNTY (help fix stratum-mining) and start new pools!
Post by: Hashturbater on February 28, 2014, 06:15:20 PM
I've tried doing...
---------------------------------------------------------
cd ~
git clone https://github.com/Crypto-Expert/stratum-mining.git stratum-mining-max
cd stratum-mining-max
git checkout maxcoin
./update_submodules
cd externals/maxcoin-hash-python
python setup.py install
cd ../stratum
python setup.py install

update the "autobahn.twisted.websocket import" line

cp sample config and edit it, using coin daemon as "max", wallet addy, rpc items, etc.

then running, twistd -ny launcher.tac from ~/stratum-mining-max
---------------------------------------------------------

but I'm getting the following...

2014-02-28 10:44:01,542 ERROR template_registry # [Failure instance: Traceback: <type 'exceptions.NameError'>: global name 'sha3_256' is not defined
/usr/local/lib/python2.7/dist-packages/Twisted-13.2.0-py2.7-linux-x86_64.egg/twisted/internet/defer.py:1155:gotResult
/usr/local/lib/python2.7/dist-packages/Twisted-13.2.0-py2.7-linux-x86_64.egg/twisted/internet/defer.py:1142:_inlineCallbacks
/usr/local/lib/python2.7/dist-packages/Twisted-13.2.0-py2.7-linux-x86_64.egg/twisted/internet/defer.py:382:callback
/usr/local/lib/python2.7/dist-packages/Twisted-13.2.0-py2.7-linux-x86_64.egg/twisted/internet/defer.py:490:_startRunCallbacks
--- <exception caught here> ---


Title: Re: MAX COIN POOL BOUNTY (help fix stratum-mining) and start new pools!
Post by: thedonkeyking on March 03, 2014, 05:11:24 PM
but I'm getting the following...

2014-02-28 10:44:01,542 ERROR template_registry # [Failure instance: Traceback: <type 'exceptions.NameError'>: global name 'sha3_256' is not defined
/usr/local/lib/python2.7/dist-packages/Twisted-13.2.0-py2.7-linux-x86_64.egg/twisted/internet/defer.py:1155:gotResult
/usr/local/lib/python2.7/dist-packages/Twisted-13.2.0-py2.7-linux-x86_64.egg/twisted/internet/defer.py:1142:_inlineCallbacks
/usr/local/lib/python2.7/dist-packages/Twisted-13.2.0-py2.7-linux-x86_64.egg/twisted/internet/defer.py:382:callback
/usr/local/lib/python2.7/dist-packages/Twisted-13.2.0-py2.7-linux-x86_64.egg/twisted/internet/defer.py:490:_startRunCallbacks
--- <exception caught here> ---

Did you ever figure out the sha3_256 error?  I'm getting the exact same thing.  I've tried clean installs, different git repos, nothing. 

Anyone else have a solution for the sha3_256 not defined error?