jtoomim / p2pool Goto Github PK
View Code? Open in Web Editor NEWThis project forked from p2pool/p2pool
Peer-to-peer Bitcoin mining pool
Home Page: https://github.com/jtoomim/p2pool/
License: GNU General Public License v3.0
This project forked from p2pool/p2pool
Peer-to-peer Bitcoin mining pool
Home Page: https://github.com/jtoomim/p2pool/
License: GNU General Public License v3.0
I'm interested in generating some testnet coins on Bitcoin Core (tBTC). Is this possible with this project?
More generally, are there any testnet pools available for Bitcoin Core?
Some times I get this error on the debug log
2019-10-18 00:14:20.862869 >>>Authorize: 1CVaiBEx8t8Qiq5CK1Tu63BBuByU9qjFMf+119808 from 192.162.65.242 Squelched JSON error: Traceback (most recent call last): File "/usr/local/lib/pypy2.7/dist-packages/Twisted-17.9.0-py2.7-linux-x86_64.egg/twisted/protocols/basic.py", line 454, in dataReceived self.lineReceived(line) File "/home/kamren/p2pool/p2pool/util/jsonrpc.py", line 164, in lineReceived _handle(line, self, response_handler=self._matcher.got_response).addCallback(lambda line2: self.sendLine(line2) if line2 is not None else None) File "/usr/local/lib/pypy2.7/dist-packages/Twisted-17.9.0-py2.7-linux-x86_64.egg/twisted/internet/defer.py", line 1532, in unwindGenerator return _inlineCallbacks(None, gen, Deferred()) File "/usr/local/lib/pypy2.7/dist-packages/Twisted-17.9.0-py2.7-linux-x86_64.egg/twisted/internet/defer.py", line 1386, in _inlineCallbacks result = g.send(result) --- <exception caught here> --- File "/home/kamren/p2pool/p2pool/util/jsonrpc.py", line 85, in _handle result = yield method_meth(*list(preargs) + list(params)) File "/home/kamren/p2pool/p2pool/bitcoin/stratum.py", line 48, in rpc_configure minbitcount = extensionParameters['version-rolling.min-bit-count'] exceptions.KeyError: 'version-rolling.min-bit-count'
Jtoomim, P2Pool does not support MimbleWimble extension blocks or signaling for MWEB.
Litecoin core version 0.21.2 RC6 with P2Pool version 16.0-192-g6dac42e (3501) results in the following P2Pool error:
2022-04-16 21:08:33.857138 > ########################################
2022-04-16 21:08:33.857332 > >>> Warning: LOST CONTACT WITH BITCOIND for 1.1 minutes! Check that it isn't frozen or dead!
2022-04-16 21:08:33.857406 > ########################################
Is there a plan to modify the current P2Pool codebase to support MW before activation in May 2022? Without modification, the Litecoin P2Pool network will stop mining valid blocks in approximately 30 days. Please advise.
@jtoomim ,
Do you have any idea why I'm getting this error when finding an AUX block? I just updated my p2pool to latest and now it is giving me that error.
Thank you,
Error while processing merged mining POW:
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/d
efer.py", line 1128, in _inlineCallbacks
result = g.send(result)
File "/root/p2pool/p2pool/util/jsonrpc.py", line 85, in _handle
result = yield method_meth(*list(preargs) + list(params))
File "/root/p2pool/p2pool/bitcoin/stratum.py", line 134, in rpc_submit
result = got_response(header, worker_name, coinb_nonce, self.target)
File "/root/p2pool/p2pool/bitcoin/worker_interface.py", line 139, in <lambda>
lambda header, user, coinbase_nonce, pseudoshare_target: handler(header, user, pack.IntType(self._my_bits).pack(nonce) + coinbase_nonce, pseudoshare_target),
--- <exception caught here> ---
File "/root/p2pool/p2pool/work.py", line 488, in got_response
sub_meth = aux_work['merged_proxy'].rpc.getauxblock
File "/root/p2pool/p2pool/util/jsonrpc.py", line 50, in __getattr__
raise AttributeError('%r object has no attribute %r' % (self.__class__.__name__, attr))
exceptions.AttributeError: 'Proxy' object has no attribute 'rpc'
Hello. How to implement the display of the work of low-power miners?
For example, if a miner has a capacity of only 100 megahashes, it connects and does the work, but the pool itself does not see it and does not display statistics on it.
How to make it display statistics?
Just needs the pypy setup run
Bitmain recently released firmware which makes Overt AsicBoost available on S9s for compatible pools. Unfortunately, Bitmain has not specified the "multiversion" stratum extension that they're using, so this needs to be reverse engineered or determined based on the bmminer source code.
For Dragonmint machines, but not for S9s and for S9s with the newest firmware:
I am offering a 3 BCH bounty for the implementation of multiversion support for Antminer S9s for p2pool. Edit: I'm changing the bounty to $1500 worth of crypto, given the recent price drops.
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.
Hello! Can't run p2pool with Bitcoin Cash. Here is the log on startup:
# pypy run_p2pool.py --net bitcoincash --bitcoind-config-path /root/.bitcoin/bitcoin.conf
2022-06-13 23:16:10.734485 p2pool (version 16.0-200-g9eaae22)
2022-06-13 23:16:10.734740
2022-06-13 23:16:10.734939 Testing bitcoind RPC connection to 'http://127.0.0.1:8332/' with username 'bch'...
2022-06-13 23:16:10.946342 ...success!
2022-06-13 23:16:10.946568 Current block hash: 643c01c8ffe2d6d55667e3de5d059f4fa1b3e07e2b332cb
2022-06-13 23:16:10.946725 Current block height: 744356
2022-06-13 23:16:10.946864
2022-06-13 23:16:10.947050 Testing bitcoind P2P connection to '127.0.0.1:8333'...
2022-06-13 23:16:10.951640 ...success!
2022-06-13 23:16:10.951795
2022-06-13 23:16:10.951979 Determining payout address...
2022-06-13 23:16:10.952167 Getting payout address from bitcoind...
Error getting payout address from bitcoind:
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 "/root/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 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)
File "/root/p2pool/p2pool/p2pool/util/jsonrpc.py", line 133, in _http_do
raise Error_for_code(resp['error']['code'])(resp['error']['message'], resp['error'].get('data', None))
p2pool.util.jsonrpc.NarrowError: -32601 Method not found
# bitcoin-cli -version
Bitcoin Cash Node RPC client version v24.1.0-unk
Can you help me?
Currently, p2pool does not perform any full validation of blocks or transactions. A peer can send a share that corresponds to a block that is invalid because it exceeds blocksize or sigop limits, because it includes a transaction with an invalid signature, because it contains a double-spend, because it builds upon an invalid block, because it builds on an extremely old block, or any other issue. This allows a malicious node to collect revenue from p2pool without performing any useful work for p2pool.
Note: In #19 I am advocating for removing fast share/block propagation code from p2pool, which would make it more difficult to add full validation.
Getting error below, any plans to make this compatible?
2022-03-16 21:19:05.848096 P2Pool: 21248 shares in chain (13930 verified/21252 total) Peers: 7 (1 incoming)
2022-03-16 21:19:05.848204 Local: 0H/s in last 0.0 seconds Local dead on arrival: ??? Expected time to share: ???
2022-03-16 21:19:05.848236 Shares: 0 (0 orphan, 0 dead) Stale rate: ??? Efficiency: ??? Current payout: (0.0000)=0.0000 BTC
2022-03-16 21:19:05.848279 Pool: 408TH/s Stale rate: 1.6% Expected time to block: 9.2 years
2022-03-16 21:19:07.510267 Received good share: diff=2.79e+06 hash=000000000000025ec8711c5c89ba085accdd10e2ffd9eb3ff7cb45fd7eaa01ad miner=1HCfZtXnrds7drCe7PysTEHC67xtunfKjd
2022-03-16 21:19:10.393860 Unknown softforks found: set([u'taproot'])
2022-03-16 21:19:10.393983 Required softforks: [u'csv', u'!segwit', u'taproot'] Known: set(['bip65', 'csv', 'segwit'])
Unhandled Error
Traceback (most recent call last):
File "/home/rob/btcpool/p2pool/main.py", line 722, in run
reactor.run()
File "/usr/lib/python2.7/dist-packages/twisted/internet/base.py", line 1243, in run
self.mainLoop()
File "/usr/lib/python2.7/dist-packages/twisted/internet/base.py", line 1252, in mainLoop
self.runUntilCurrent()
File "/usr/lib/python2.7/dist-packages/twisted/internet/base.py", line 878, in runUntilCurrent
call.func(*call.args, **call.kw)
--- ---
File "/home/rob/btcpool/p2pool/bitcoin/stratum.py", line 75, in _send_work
x, got_response = self.wb.get_work(*self.wb.preprocess_request('' if self.username is None else self.username))
File "/home/rob/btcpool/p2pool/bitcoin/worker_interface.py", line 132, in get_work
desired_pseudoshare_target, worker_ip, *args)
File "/home/rob/btcpool/p2pool/work.py", line 278, in get_work
raise jsonrpc.Error_for_code(-12345)(u'unknown rule activated')
p2pool.util.jsonrpc.NarrowError: -12345 unknown rule activated
Following is the log of the error:
What might be the issue?
`root@nf:/home/p2pool# python run_p2pool.py --testnet
2019-07-13 10:05:52.332821 p2pool (version 16.0-160-g9b5938a)
2019-07-13 10:05:52.333124
2019-07-13 10:05:52.333432 Testing bitcoind P2P connection to '127.0.0.1:18333'...
2019-07-13 10:05:52.338334 ...success!
2019-07-13 10:05:52.338552
2019-07-13 10:05:52.338791 Testing bitcoind RPC connection to 'http://127.0.0.1:18332/' with username 'shiobi'...
Error while checking Bitcoin connection:
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 653, in _runCallbacks
current.result = callback(current.result, *args, **kw)
File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1442, in gotResult
_inlineCallbacks(r, g, deferred)
File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1384, in _inlineCallbacks
result = result.throwExceptionIntoGenerator(g)
File "/usr/lib/python2.7/dist-packages/twisted/python/failure.py", line 408, in throwExceptionIntoGenerator
return g.throw(self.type, self.value, self.tb)
--- ---
File "/home/p2pool/p2pool/util/deferral.py", line 41, in f
result = yield func(*args, **kwargs)
File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1384, in _inlineCallbacks
result = result.throwExceptionIntoGenerator(g)
File "/usr/lib/python2.7/dist-packages/twisted/python/failure.py", line 408, in throwExceptionIntoGenerator
return g.throw(self.type, self.value, self.tb)
File "/home/p2pool/p2pool/bitcoin/helper.py", line 14, in check
if not (yield net.PARENT.RPC_CHECK(bitcoind)):
File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1384, in _inlineCallbacks
result = result.throwExceptionIntoGenerator(g)
File "/usr/lib/python2.7/dist-packages/twisted/python/failure.py", line 408, in throwExceptionIntoGenerator
return g.throw(self.type, self.value, self.tb)
File "/home/p2pool/p2pool/bitcoin/networks/bitcoin_testnet.py", line 18, in
(yield bitcoind.rpc_getinfo())['testnet']
File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1384, in _inlineCallbacks
result = result.throwExceptionIntoGenerator(g)
File "/usr/lib/python2.7/dist-packages/twisted/python/failure.py", line 408, in throwExceptionIntoGenerator
return g.throw(self.type, self.value, self.tb)
File "/home/p2pool/p2pool/util/jsonrpc.py", line 133, in _http_do
raise Error_for_code(resp['error']['code'])(resp['error']['message'], resp['error'].get('data', None))
p2pool.util.jsonrpc.NarrowError: -32601 Method not found
`
Error getting work from bitcoind:
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 "/root/p2poolSoloNew/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 "/root/p2poolSoloNew/p2pool/bitcoin/helper.py", line 102, in getwork
unpacked = bitcoin_data.tx_type.unpack(packed)
File "/root/p2poolSoloNew/p2pool/util/pack.py", line 55, in unpack
obj = self._unpack(data, ignore_trailing)
File "/root/p2poolSoloNew/p2pool/util/pack.py", line 42, in _unpack
obj = self.read(data)
File "/root/p2poolSoloNew/p2pool/bitcoin/data.py", line 178, in read
locktime = self._int_type.read(file)
File "/root/p2poolSoloNew/p2pool/util/pack.py", line 175, in read
return struct.unpack(self.desc, data)[0]
struct.error: unpack str size too short for format```
litecoin on latest version, p2pool as well.
The recent username in this branch I dont think work as intended all the time. username+16.999 the 999 gets treated as the worker, and the pseudo share diff gets set to 16.
A second split of the username should maybe be done separately?
Can the regex here be pre-compiled, or is class/object created on each request?
This is not the most accurate test, but the difference seems pretty consistent.
>>> reg = re.compile('[/+]')
>>> now = time.time(); re.split("[/+]", "worker+16.000"); print("{:.8f}".format(time.time() - now))
['worker', '16.000']
0.00003386
>>> now = time.time(); reg.split("worker+16.000"); print("{:.8f}".format(time.time() - now))
['worker', '16.000']
0.00002599
can you add ravencoin?
i search for an p2pool for ravencoin kawpow algo but i found nothing
I've created my own altcoin and setting up p2pool for scrypt mining. Everything works great until a block gets mined and I get this error. Also the miner only get's 0.1 coin and not 20. Been trying to get around this for days now. Appriciate if you guys could take the time to help me out :)
"
2022-07-12 20:39:44.211862 P2Pool: 0 shares in chain (0 verified/0 total) Peers: 0 (0 incoming)
2022-07-12 20:39:44.212049 Local: 12530H/s in last 15.5 seconds Local dead on arrival: ~0.0% (0-8%) Expected time to share: 1.4 minutes
2022-07-12 20:40:14.213224 P2Pool: 0 shares in chain (0 verified/0 total) Peers: 0 (0 incoming)
2022-07-12 20:40:14.213432 Local: 10116H/s in last 45.5 seconds Local dead on arrival: ~0.0% (0-6%) Expected time to share: 1.7 minutes
2022-07-12 20:40:44.214071 P2Pool: 0 shares in chain (0 verified/0 total) Peers: 0 (0 incoming)
2022-07-12 20:40:44.214278 Local: 13059H/s in last 1.3 minutes Local dead on arrival: ~0.0% (0-5%) Expected time to share: 1.3 minutes
2022-07-12 20:41:14.215882 P2Pool: 0 shares in chain (0 verified/0 total) Peers: 0 (0 incoming)
2022-07-12 20:41:14.216086 Local: 13328H/s in last 1.8 minutes Local dead on arrival: ~0.0% (0-5%) Expected time to share: 1.3 minutes
2022-07-12 20:41:23.496091
2022-07-12 20:41:23.496219 GOT BLOCK FROM MINER! Passing to bitcoind! ed0a3adec61d58ac430ea25040525aaf24445f308c7aadfc3774c5884bf88352
2022-07-12 20:41:23.496270
2022-07-12 20:41:23.500576 GOT SHARE! MThiBVZ1xAEYSvB6i1WXR5BbQYSsRY9pHV 4bf88352 prev xxxxxxxx age 115.82s
2022-07-12 20:41:23.501659 88754209086101587363432403941069444047867804914959720749306888963007345768855 42114609786524032990359427111505060556914516875841598301516162347366901126883
2022-07-12 20:41:23.501795 {'version': 1, 'tx_ins': [{'previous_output': None, 'sequence': None, 'script': '\x02\x84\x08'}], 'tx_outs': [{'value': 0, 'script': 'j$\xaa!\xa9\xed\x92\xac\x07\xc7\xb9\xe0\x08\xef\xfd\xe0\xe4u0d\xf22\x8b\x1c\x8c\xd3\xd0\xb4\x88\xf4\xbf\x1b\xba\x8c\xb93\x8c6'}, {'value': 10000000, 'script': 'v\xa9\x14\xd981\xb1\xa8\x0f\xc1\xaeM\x06M\x92\xfa\xe4\xeb\xd5\xa4\x15\x9c_\x88\xac'}, {'script': 'A\x04\xff\xd0=\xe4Jn\x11\xb9\x91\x7f:)\xf9D2\x83\xd9\x87\x1c\x9dt>\xf3\r^\xdd\xcd7\tKd\xd1\xb3\xd8\t\x04\x96\xb52Vxk\xf5\xc8)2\xec#\xc3\xb7M\x9f\x05\xa6\xf9Z\x8bU)5&VfK\xac', 'value': 1990000000}, {'value': 0, 'script': 'j(NFZZ4\xa5\x94Y\x01!\t\xbc\xa7%\xe29\xb2\x90x\xd8\xbd\xb1\x19[\x9bk6m\x94s8\xdf\x07\x00\x00\x00\x00\x00\x00\x00'}], 'lock_time': 0, 'marker': 0, 'flag': 1, 'witness': [['[P2Pool][P2Pool][P2Pool][P2Pool]']]}
Share check failed: ed0a3adec61d58ac430ea25040525aaf24445f308c7aadfc3774c5884bf88352 -> 0000000000000000000000000000000000000000000000000000000000000000
Traceback (most recent call last):
File "/home/ubuntu/p2pool/p2pool/bitcoin/worker_interface.py", line 139, in
lambda header, user, coinbase_nonce, pseudoshare_target: handler(header, user, pack.IntType(self._my_bits).pack(nonce) + coinbase_nonce, pseudoshare_target),
File "/home/ubuntu/p2pool/p2pool/work.py", line 530, in got_response
self.node.set_best_share()
File "/home/ubuntu/p2pool/p2pool/node.py", line 327, in set_best_share
best, desired, decorated_heads, bad_peer_addresses, self.punish= self.tracker.think(self.get_height_rel_highest, self.get_height, self.bitcoind_work.value['previous_block'], self.bitcoind_work.value['bits'], self.known_txs_var.value, self.feecache)
File "/home/ubuntu/p2pool/p2pool/data.py", line 745, in think
if self.attempt_verify(share, block_abs_height_func, known_txs, feecache):
--- ---
File "/home/ubuntu/p2pool/p2pool/data.py", line 723, in attempt_verify
share.gentx = share.check(self, known_txs, block_abs_height_func=block_abs_height_func, feecache=feecache)
File "/home/ubuntu/p2pool/p2pool/data.py", line 557, in check
raise ValueError('''gentx doesn't match hash_link''')
exceptions.ValueError: gentx doesn't match hash_link
2022-07-12 20:41:23.511306 > Block submittal result: False (u'duplicate') Expected: True
2022-07-12 20:41:23.512931 New work! Share diff: 0.00 Block value: 20.00 TWTC (0 tx, 0 kB)
2022-07-12 20:41:44.216756 P2Pool: 0 shares in chain (0 verified/0 total) Peers: 0 (0 incoming)
2022-07-12 20:41:44.216938 Local: 12131H/s in last 2.3 minutes Local dead on arrival: ~0.0% (0-5%) Expected time to share: 1.5 minutes
2022-07-12 20:42:14.217614 P2Pool: 0 shares in chain (0 verified/0 total) Peers: 0 (0 incoming)
2022-07-12 20:42:14.217767 Local: 9932H/s in last 2.8 minutes Local dead on arrival: ~0.0% (0-5%) Expected time to share: 1.9 minutes
"
i was suppose to check merged urls feature but it always fail wen start calling a error on message.
Hi guys,
I'm getting that error in my p2pool.
Can anyone help?
Thank you,
Hi, version p2pool 34 (including the latest commits) does not work on BitcoinABC latest version (0.21.0) daemon, and BTC 0.19.0.1
Hello there,
I tried cloning the repo and changing the identifiers in the network/bitcoin.py file to start a new Sharechain so I could solo mine BTC. It gives me the error"
segwit transaction included before activation
When a miner tries to connect/send a share.
Thank you for your time.
A few days ago the node with the most hash switched to 34.0 and the network has switched.
Are you monitoring for bugs/issues? I have upgraded am seeing a lots of requests for parent shares and a lot of connects and attempts to share from older peers (because both are "protocol version is 3301" ?)
It's been a while since going through a p2pool version change for me, so I forget what the expected issues are such.
This came quick, I think it got pool owners off-guard.
Looks like right now the old chain has about 30GH/s but also seems to be the majority of nodes.
There is about 500GH/s on the new chain.
P2pool crashed and exited without any python error messages with just these lines below:
corrupted size vs. prev_size
Aborted
Was trying to connect nicehash to p2pool
Selected mining algorithm: Scrypt... OK
Sending mining subscribe request... OK
Sending login information... OK
Mining subscribe request successfully completed... OK
Received mining set difficulty... OK
Pool difficulty is correct (provided=3847630.19764, minimum=500000)... OK
Received invalid work response... Error
What might be the problem?
Hi guys,
Getting this error while mining Litecoin/DOGE.
It shows up, screws the hashing for some time then it goes away.
Unhandled Error
Traceback (most recent call last):
File "/p2pool/main.py", line 723, in run
reactor.run()
File "/usr/local/lib/pypy2.7/dist-packages/Twisted-15.4.0-py2.7-linux-x86_64.egg/twisted/internet/base.py", line 1194, in run
self.mainLoop()
File "/usr/local/lib/pypy2.7/dist-packages/Twisted-15.4.0-py2.7-linux-x86_64.egg/twisted/internet/base.py", line 1203, in mainLoop
self.runUntilCurrent()
File "/usr/local/lib/pypy2.7/dist-packages/Twisted-15.4.0-py2.7-linux-x86_64.egg/twisted/internet/base.py", line 825, in runUntilCurrent
call.func(*call.args, **call.kw)
--- <exception caught here> ---
File "/p2pool/bitcoin/stratum.py", line 75, in _send_work
x, got_response = self.wb.get_work(*self.wb.preprocess_request('' if self.username is None else self.username))
File "/p2pool/bitcoin/worker_interface.py", line 132, in get_work
desired_pseudoshare_target, worker_ip, *args)
File "/p2pool/work.py", line 370, in get_work
base_subsidy=self.node.net.PARENT.SUBSIDY_FUNC(self.current_work.value['height']),
File "/p2pool/data.py", line 197, in generate_transaction
if all_transaction_weight + this_weight + 4*80 + cls.gentx_weight + 2000 > net.BLOCK_MAX_WEIGHT and not net.IMMUTABLE_BLOCKS:
exceptions.AttributeError: 'module' object has no attribute 'IMMUTABLE_BLOCKS'
Thank you for supporting p2pool,
Igor Almeida
I am running last release p2pool with Bitcoin ABC 0.20.4 full node. After start command pypy run_p2pool.py --net bitcoincash --bitcoind-config-path /opt/bch/bitcoin.conf I got the error: You are running a coin daemon that does not support all of the forking features that have been activated on this blockchain. Consequently, your node may mine invalid blocks or may mine blocks that are not part of the Nakamoto consensus blockchain. Missing fork features: bip65, csv
My bitcoin.conf
`datadir=/opt/bch/chainstate
pid=/opt/bch/bch.pid
daemon=1
server=1
txindex=1
#debug=bench
logips=1
deprecatedrpc=estimatefee
rpcuser=***
rpcpassword=***
rpcbind=127.0.0.1:10933
rpcallowip=0.0.0.0/0
rpcport=10933
bind=212.19.134.154:8333
`
Got the following error:
P2pool has a bunch of unnecessary code in it for handling transactions. This code is the main source of performance issues in p2pool code, and causes shares to propagate and process slowly, thereby increasing p2pool's share orphan/DOA rates and reducing mining fairness. This transaction handling code also makes p2pool unable to scale to large block sizes.
The core of the problem is that p2pool encodes transactions using a special 2- or 3-byte encoding scheme for transactions that are included in multiple shares, and this encoded list gets included in the share's metadata OP_RETURN commitment. This encoded transaction list is redundant information, as the transactions are already committed via the merkle root hash.
The encoding scheme is to use a (share_height_delta, transaction_index) pair to tell p2pool where it can find the TXID for that transaction (by lookup in a previous share). Using this encoding scheme, p2pool was able to transmit shares (which can be decoded into full blocks) faster than pre-Xthin/Compact-Blocks bitcoind was able to transmit blocks. In the p2p layer, nodes will keep a dictionary of txid:transaction mappings, and will send all of the transactions it receives to each of its peers to ensure that the recipient can decode a share into a block as soon as the share is received, without needing to request any additional transactions over the network.
Now that we have schemes like Compact Blocks and Graphene (written in C++), p2pool's python-based fast-block propagation is entirely obsolete. Having p2pool do processing on a per-transaction basis means that the system's performance is limited by the speed at which python code can process transactions relative to p2pool's 30-60 sec share interval, and that performance constraint is far tighter than Bitcoin's limit of the speed at which C++ code can process transactions relative to Bitcoin's 600 sec bock interval.
The changes to be made fall into four main categories: Changes to the share data structure, changes to block reconstruction, changes to the p2p protocol layer, and (optionally) adding a mechanism for block/share reconstruction and validation that is asynchronous and outside the latency-critical path.
Share structure changes
The core of the change is that two fields in the share_info data structure need to be removed: new_transaction_hashes and transaction_hash_refs. There's a lot of code in various places that touch these variables, like in Share.generate_transaction(...), all of which needs to be removed or replaced. Most of it is in p2pool/data.py.
This is a hard forking change. Because of the extent of the changes, and because so much of the change will be code deletion instead of addition, it may be better to roll out this change in a backward-incompatible fashion, and just start a new share chain instead of using the typical hard fork upgrade mechanism. But if you think you can do it as a more typical hard fork, that's cool too.
Block reconstruction
As the list of transactions in a share will not be stored in the same way, some changes might be necessary to the getblocktemplate, stratum, and block reconstruction code to make sure that all of the information needed to reassemble blocks is still retained.
P2P changes
After the share changes have been made, it will no longer be necessary for peers to send transactions to each other. This involves the update_remote_view_of_my_mining_txs(...) function; the update_remote_view_of_my_known_txs(...) function; the have_tx, losing_tx, forget_tx, and remember_tx messages, all in p2p.py; and some code in work.py for keeping track of transactions in getblocktemplate results.
Asynchronous validation
[Not yet written]
This description is not yet complete. I'll add more information later.
I am offering a $5000 total bounty for this project. Milestone payments are an option.
After run this command
pypy run_p2pool.py --net bitcoincash --bitcoind-config-path /opt/bch/bitcoin.conf --allow-obsolete-bitcoind
I got the error:
Fatal error: Traceback (most recent call last): File "/usr/local/lib/pypy2.7/dist-packages/Twisted-17.9.0-py2.7-linux-x86_64.egg/twisted/internet/defer.py", line 567, in _startRunCallbacks self._runCallbacks() File "/usr/local/lib/pypy2.7/dist-packages/Twisted-17.9.0-py2.7-linux-x86_64.egg/twisted/internet/defer.py", line 653, in _runCallbacks current.result = callback(current.result, *args, **kw) File "/usr/local/lib/pypy2.7/dist-packages/Twisted-17.9.0-py2.7-linux-x86_64.egg/twisted/internet/defer.py", line 1442, in gotResult _inlineCallbacks(r, g, deferred) File "/usr/local/lib/pypy2.7/dist-packages/Twisted-17.9.0-py2.7-linux-x86_64.egg/twisted/internet/defer.py", line 1386, in _inlineCallbacks result = g.send(result) --- <exception caught here> --- File "/home/kamren/p2pool/p2pool/main.py", line 138, in main if not res['isvalid'] or not res['ismine']: exceptions.KeyError: 'ismine'
Shutting down operations?
Hi,
I'm getting the following warning on 1mb_segwit:
Warning: A MAJORITY OF SHARES CONTAIN A VOTE FOR AN UNSUPPORTED SHARE IMPLEMENTATION! (v34 with 90% support)
Anything that should I do or just go with the flow?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.