moopless / stratum-mining-litecoin

This fork is no longer maintained. Please use https://github.com/ahmedbodi/stratum-mining
Other
38 stars 35 forks source link

ERROR template_registry template_registry._update_block_failed #32

Closed abweb closed 11 years ago

abweb commented 11 years ago

Hi,

i have problem with BitBar, pool dont works, errors:

2013-07-06 18:12:48,617 INFO block_updater block_updater.run # Merkle update! Prevhash: 0000000020ac91585682393c31ae0c9a1302e0e268cb1e0257cdc2f66b255998
2013-07-06 18:12:48,622 INFO template_registry block_template.fill_from_rpc # 
2013-07-06 18:12:48,623 ERROR template_registry template_registry._update_block_failed # [Failure instance: Traceback: <class 'struct.error'>: unpack requires a string argument of length 4
/usr/local/lib/python2.7/dist-packages/Twisted-13.0.0-py2.7-linux-x86_64.egg/twisted/internet/defer.py:1126:gotResult
/usr/local/lib/python2.7/dist-packages/Twisted-13.0.0-py2.7-linux-x86_64.egg/twisted/internet/defer.py:1113:_inlineCallbacks
/usr/local/lib/python2.7/dist-packages/Twisted-13.0.0-py2.7-linux-x86_64.egg/twisted/internet/defer.py:380:callback
/usr/local/lib/python2.7/dist-packages/Twisted-13.0.0-py2.7-linux-x86_64.egg/twisted/internet/defer.py:488:_startRunCallbacks
--- <exception caught here> ---
/usr/local/lib/python2.7/dist-packages/Twisted-13.0.0-py2.7-linux-x86_64.egg/twisted/internet/defer.py:575:_runCallbacks
/home/sannin/lib/template_registry.py:130:_update_block
/home/sannin/lib/block_template.py:71:fill_from_rpc
/home/sannin/lib/halfnode.py:144:deserialize
/home/sannin/lib/util.py:71:deser_vector
/home/sannin/lib/halfnode.py:109:deserialize
]

2013-07-06 18:15:38,000 INFO block_updater block_updater.run # Merkle update! Prevhash: 0000000020ac91585682393c31ae0c9a1302e0e268cb1e0257cdc2f66b255998
2013-07-06 18:15:38,005 INFO template_registry block_template.fill_from_rpc # 
2013-07-06 18:15:38,005 ERROR template_registry template_registry._update_block_failed # [Failure instance: Traceback: <class 'struct.error'>: unpack requires a string argument of length 4
/usr/local/lib/python2.7/dist-packages/Twisted-13.0.0-py2.7-linux-x86_64.egg/twisted/internet/defer.py:1126:gotResult
/usr/local/lib/python2.7/dist-packages/Twisted-13.0.0-py2.7-linux-x86_64.egg/twisted/internet/defer.py:1113:_inlineCallbacks
/usr/local/lib/python2.7/dist-packages/Twisted-13.0.0-py2.7-linux-x86_64.egg/twisted/internet/defer.py:380:callback
/usr/local/lib/python2.7/dist-packages/Twisted-13.0.0-py2.7-linux-x86_64.egg/twisted/internet/defer.py:488:_startRunCallbacks
--- <exception caught here> ---
/usr/local/lib/python2.7/dist-packages/Twisted-13.0.0-py2.7-linux-x86_64.egg/twisted/internet/defer.py:575:_runCallbacks
/home/sannin/lib/template_registry.py:130:_update_block
/home/sannin/lib/block_template.py:64:fill_from_rpc
/home/sannin/lib/halfnode.py:141:deserialize
/home/sannin/lib/util.py:71:deser_vector
/home/sannin/lib/halfnode.py:107:deserialize
]

Can You help mi with this? Thanks!

moopless commented 11 years ago

Sounds like bitbar has a different block structure. We will have to change the block structure in block template. Can you find out what the header sizes/requirements are for bitbar?

abweb commented 11 years ago

How I check this? Block template:

bitbard getblocktemplate {}
{
    "version" : 3,
    "previousblockhash" : "0000000020244248bdeba1906c0f50c6293016ec70f6f047ee9f793deda4181b",
    "transactions" : [
    ],
    "coinbaseaux" : {
        "flags" : "062f503253482f"
    },
    "coinbasevalue" : 195625,
    "target" : "000000002f4ec700000000000000000000000000000000000000000000000000",
    "mintime" : 1373283450,
    "mutable" : [
        "time",
        "transactions",
        "prevblock"
    ],
    "noncerange" : "00000000ffffffff",
    "sigoplimit" : 20000,
    "sizelimit" : 1000000,
    "curtime" : 1373285674,
    "bits" : "1c2f4ec7",
    "height" : 14654
}
moopless commented 11 years ago

It should be in the official documents for the coin. I went looking for them and those don't exist. I can go to the source if need, but my initial research shows that this is just a novacoin fork. Can you try with the PoS branch?

git checkout PoS
abweb commented 11 years ago

I tried and I have another error

2013-07-08 15:10:39,467 INFO block_updater # Checking for new block.
2013-07-08 15:10:39,469 INFO block_updater # New block! Prevhash: 00000000143b80c03382357d884f26ef5992cc069c9b38a71c9d95249de877bd
2013-07-08 15:10:39,470 ERROR template_registry # [Failure instance: Traceback: <type 'exceptions.Exception'>: Invalid Public Key: Check CENTRAL_WALLET
/usr/local/lib/python2.7/dist-packages/Twisted-13.0.0-py2.7-linux-x86_64.egg/twisted/internet/defer.py:1126:gotResult
/usr/local/lib/python2.7/dist-packages/Twisted-13.0.0-py2.7-linux-x86_64.egg/twisted/internet/defer.py:1113:_inlineCallbacks
/usr/local/lib/python2.7/dist-packages/Twisted-13.0.0-py2.7-linux-x86_64.egg/twisted/internet/defer.py:380:callback
/usr/local/lib/python2.7/dist-packages/Twisted-13.0.0-py2.7-linux-x86_64.egg/twisted/internet/defer.py:488:_startRunCallbacks
--- <exception caught here> ---
/usr/local/lib/python2.7/dist-packages/Twisted-13.0.0-py2.7-linux-x86_64.egg/twisted/internet/defer.py:575:_runCallbacks
/home/sannin/stratum-mining-litecoin/lib/template_registry.py:130:_update_block
/home/sannin/stratum-mining-litecoin/lib/block_template.py:51:fill_from_rpc
/home/sannin/stratum-mining-litecoin/lib/coinbasetx.py:36:__init__
/home/sannin/stratum-mining-litecoin/lib/coinbaser.py:28:get_script_pubkey
/home/sannin/stratum-mining-litecoin/lib/util.py:216:script_to_pubkey
]
2013-07-08 15:10:44,472 INFO block_updater # Checking for new block.
2013-07-08 15:10:44,474 INFO block_updater # New block! Prevhash: 00000000143b80c03382357d884f26ef5992cc069c9b38a71c9d95249de877bd
2013-07-08 15:10:44,476 ERROR template_registry # [Failure instance: Traceback: <type 'exceptions.Exception'>: Invalid Public Key: Check CENTRAL_WALLET
/usr/local/lib/python2.7/dist-packages/Twisted-13.0.0-py2.7-linux-x86_64.egg/twisted/internet/defer.py:1126:gotResult
/usr/local/lib/python2.7/dist-packages/Twisted-13.0.0-py2.7-linux-x86_64.egg/twisted/internet/defer.py:1113:_inlineCallbacks
/usr/local/lib/python2.7/dist-packages/Twisted-13.0.0-py2.7-linux-x86_64.egg/twisted/internet/defer.py:380:callback
/usr/local/lib/python2.7/dist-packages/Twisted-13.0.0-py2.7-linux-x86_64.egg/twisted/internet/defer.py:488:_startRunCallbacks
--- <exception caught here> ---
/usr/local/lib/python2.7/dist-packages/Twisted-13.0.0-py2.7-linux-x86_64.egg/twisted/internet/defer.py:575:_runCallbacks
/home/sannin/stratum-mining-litecoin/lib/template_registry.py:130:_update_block
/home/sannin/stratum-mining-litecoin/lib/block_template.py:51:fill_from_rpc
/home/sannin/stratum-mining-litecoin/lib/coinbasetx.py:36:__init__
/home/sannin/stratum-mining-litecoin/lib/coinbaser.py:28:get_script_pubkey
/home/sannin/stratum-mining-litecoin/lib/util.py:216:script_to_pubkey
]
moopless commented 11 years ago

I put this check in when using PoS coins.

2013-07-08 15:10:39,470 ERROR template_registry # [Failure instance: Traceback: <type 'exceptions.Exception'>: Invalid Public Key: Check CENTRAL_WALLET

For PoS, you need to have the pubkey instead of the address for CENTRAL_WALLET.

abweb commented 11 years ago

Works! Thanks :)

sunggeorge commented 10 years ago

Thanks! Really save me lots of time.

I never know it's pubkey for POS wallet.

tbourvon commented 10 years ago

Bump! This is happening for Hobonickels, a POW coin. My worker seems to mine just fine but I am worried this might impact my rewards...

ghost commented 10 years ago

ok, where we can find this pubkey. I am trying to setup feathercoin pool with no success - i am getting the same error as abweb?

nicoschtein commented 10 years ago

Use ahmedbodi/stratum-mining , this repo is not maintained any more. 

N I C O

On Sat, Jan 18, 2014 at 9:02 AM, prozacsf84 notifications@github.com wrote:

ok, where we can find this pubkey. I am trying to setup feathercoin pool with no success - i am getting the same error as abweb?

Reply to this email directly or view it on GitHub: https://github.com/moopless/stratum-mining-litecoin/issues/32#issuecomment-32680471