jtoomim/p2pool

Upgrade p2pool to support new wallets

Closed this issue · 12 comments

Hello,

Im here testing this one and would like to know if still possible to mine something with this software if not updated yet to last wallet support ? Example; Btc 0.18 removed commands could be used to mine.

As far as I remember, we were able to get p2pool working with Bitcoin Core 0.18. There were issues, but we fixed them.

280e48f

Are you reporting an issue, or are you asking if there is an issue?

@jtoomim , could be a issue if not fixed in 34.0 version. But i try use 0.18.1 BTC wallet and doenst work. So what i could do to run in 0.18.1 wallet ? or this version p2pool doesnt have new commands yet to mine in that wallet ?

Are you using the Master branch? Have you tried the stratum-autodiff branch? What error is being reported?

i don't use any of these master branch cause already get many trouble to run it under outdated python 2.7 and pypy takes too much to be compiled. Since software is mining under unknown rules cause i just set last stable bitcoin wallet or other one but it fails cause new commands. So can i run your software with no aditional commands too ..... but seems not being error then.

software is mining under unknown rules

That's an innocuous error message caused by ASICBOOST changing the block version numbers. You can ignore it.

it fails cause new commands

How? Please copy and paste error messages.

pypy takes too much to be compiled

You should not need to compile pypy. You can download precompiled versions of pypy.

@jtoomim compiled in old machines run better and for distros have problems like missing libs. To 0.18.1 btc for example you can run this version ?

I have not tried 0.18.1. If you have tried and it does not work, please post the error message. If you haven't tried, try it and report back. I do not have time to test every version that gets released.

With Bitcoin Core version v0.19.99.0-abb30de63 (release build)

Error while checking Bitcoin connection:
Traceback (most recent call last):
File "/usr/local/lib/pypy2.7/dist-packages/twisted/internet/defer.py", line 654, in _runCallbacks
current.result = callback(current.result, *args, **kw)
File "/usr/local/lib/pypy2.7/dist-packages/twisted/internet/defer.py", line 1475, in gotResult
_inlineCallbacks(r, g, status)
File "/usr/local/lib/pypy2.7/dist-packages/twisted/internet/defer.py", line 1416, in _inlineCallbacks
result = result.throwExceptionIntoGenerator(g)
File "/usr/local/lib/pypy2.7/dist-packages/twisted/python/failure.py", line 512, in throwExceptionIntoGenerator
return g.throw(self.type, self.value, self.tb)
--- ---
File "/opt/sha256d/p2pool-btc-fork/p2pool/util/deferral.py", line 41, in f
result = yield func(*args, **kwargs)
File "/usr/local/lib/pypy2.7/dist-packages/twisted/internet/defer.py", line 1418, in _inlineCallbacks
result = g.send(result)
File "/opt/sha256d/p2pool-btc-fork/p2pool/bitcoin/helper.py", line 27, in check
softforks_supported = set(item['id'] for item in blockchaininfo.get('softforks', []))
File "/opt/sha256d/p2pool-btc

bitcoin-cli getblockchaininfo
{
"chain": "main",
"blocks": 606219,
"headers": 606219,
"bestblockhash": "00000000000000000008782ed227f03af1a4e54b3f278ba3388edda9199c0226",
"difficulty": 12973235968799.78,
"mediantime": 1575236138,
"verificationprogress": 0.9999963621129534,
"initialblockdownload": false,
"chainwork": "00000000000000000000000000000000000000000a8438b781951a2be9f8aadc",
"size_on_disk": 284711068476,
"pruned": false,
"softforks": {
"bip34": {
"type": "buried",
"active": true,
"height": 227931
},
"bip66": {
"type": "buried",
"active": true,
"height": 363725
},
"bip65": {
"type": "buried",
"active": true,
"height": 388381
},
"csv": {
"type": "buried",
"active": true,
"height": 419328
},
"segwit": {
"type": "buried",
"active": true,
"height": 481824
}
},
"warnings": "This is a pre-release test build - use at your own risk - do not use for mining or merchant applications"
}

Well, just waited 0.19.0.1 come out and get error with 34.0:

Error while checking Bitcoin connection:
Traceback (most recent call last):
  File "/p2pool-34.0/pypy-VER-PLATFORM/site-packages/Twisted-15.4.0-py2.7-linux-x86_64.egg/twisted/internet/defer.py", line 588, in _runCallbacks
    current.result = callback(current.result, *args, **kw)
  File "/p2pool-34.0/pypy-VER-PLATFORM/site-packages/Twisted-15.4.0-py2.7-linux-x86_64.egg/twisted/internet/defer.py", line 1184, in gotResult
    _inlineCallbacks(r, g, deferred)
  File "/p2pool-34.0/pypy-VER-PLATFORM/site-packages/Twisted-15.4.0-py2.7-linux-x86_64.egg/twisted/internet/defer.py", line 1126, in _inlineCallbacks
    result = result.throwExceptionIntoGenerator(g)
  File "/p2pool-34.0/pypy-VER-PLATFORM/site-packages/Twisted-15.4.0-py2.7-linux-x86_64.egg/twisted/python/failure.py", line 389, in throwExceptionIntoGenerator
    return g.throw(self.type, self.value, self.tb)
--- ---
  File "/p2pool-34.0/p2pool/util/deferral.py", line 41, in f
    result = yield func(*args, **kwargs)
  File "/p2pool-34.0/pypy-VER-PLATFORM/site-packages/Twisted-15.4.0-py2.7-linux-x86_64.egg/twisted/internet/defer.py", line 1128, in _inlineCallbacks
    result = g.send(result)
  File "/p2pool-34.0/p2pool/bitcoin/helper.py", line 27, in check
    softforks_supported = set(item['id'] for item in blockchaininfo.get('softforks', []))
  File "/p2pool-34.0/p2pool/bitcoin/helper.py", line 27, in
    softforks_supported = set(item['id'] for item in blockchaininfo.get('softforks', []))
exceptions.TypeError: string index must be an integer, not str

I'm not sure if this was fixed but I'm still getting an error in 0.19.1 of bitcoind.

$ bitcoin-cli --version
Bitcoin Core RPC client version v0.19.1.0-g58ba7c314d552cea8cb024960a8504577aee586f
$ pypy run_p2pool.py --version
16.0-185-g32d5f62
$ pypy run_p2pool.py --testnet --bitcoind-address my_node --net bitcoin user password
2020-05-27 13:32:37.810942 p2pool (version 16.0-185-g32d5f62)
2020-05-27 13:32:37.811135 
2020-05-27 13:32:37.811355 Testing bitcoind P2P connection to 'my_node:18333'...
2020-05-27 13:32:37.819744     ...success!
2020-05-27 13:32:37.819850 
2020-05-27 13:32:37.820092 Testing bitcoind RPC connection to 'http://my_node:18332/' with username 'user'...
Error while checking Bitcoin connection:
Traceback (most recent call last):
  File "/usr/local/lib/pypy2.7/dist-packages/Twisted-15.4.0-py2.7-linux-x86_64.egg/twisted/internet/defer.py", line 588, in _runCallbacks
    current.result = callback(current.result, *args, **kw)
  File "/usr/local/lib/pypy2.7/dist-packages/Twisted-15.4.0-py2.7-linux-x86_64.egg/twisted/internet/defer.py", line 1184, in gotResult
    _inlineCallbacks(r, g, deferred)
  File "/usr/local/lib/pypy2.7/dist-packages/Twisted-15.4.0-py2.7-linux-x86_64.egg/twisted/internet/defer.py", line 1126, in _inlineCallbacks
    result = result.throwExceptionIntoGenerator(g)
  File "/usr/local/lib/pypy2.7/dist-packages/Twisted-15.4.0-py2.7-linux-x86_64.egg/twisted/python/failure.py", line 389, in throwExceptionIntoGenerator
    return g.throw(self.type, self.value, self.tb)
--- <exception caught here> ---
  File "/p2pool/p2pool/p2pool/util/deferral.py", line 41, in f
    result = yield func(*args, **kwargs)
  File "/usr/local/lib/pypy2.7/dist-packages/Twisted-15.4.0-py2.7-linux-x86_64.egg/twisted/internet/defer.py", line 1128, in _inlineCallbacks
    result = g.send(result)
  File "/p2pool/p2pool/p2pool/bitcoin/helper.py", line 27, in check
    softforks_supported = set(item['id'] for item in blockchaininfo.get('softforks', []))
  File "/p2pool/p2pool/p2pool/bitcoin/helper.py", line 27, in <genexpr>
    softforks_supported = set(item['id'] for item in blockchaininfo.get('softforks', []))
exceptions.TypeError: string index must be an integer, not str

Do you have fix for bitcoin wallet v0.20.0 yet?

This issue should have been solved by kr1z1s's PR #50. I'm closing this issue. If the issue isn't actually resolved by the above change, please reopen it.