I tried to self-debug the error I was occasionally receiving in p2pool logs and this is the printout.
It's not a script breaker as p2pool runs fine even after it but isn't this something to patch?
Unfortunately I don't know much code so this is just jargon to me but maybe it'll be of some help to others if they feel that they want to fix.
OS: Ubuntu 18.04.6
P2Pool Branch: https://github.com/jtoomim/p2pool/tree/rawtx
BCHN Wallet Version: Bitcoin Cash Node Daemon version v28.0.1-631badbf6
Original Error:
2025-02-24 21:23:53.311305 RECV inv 01a0940000e161d566328a2e08439300d9a98e3294a6e89a2c2e78d6f02c1b16025d46d1b2
Error handling message: (see RECV line)
Traceback (most recent call last):
File "/home/sinnx3/.local/lib/python2.7/site-packages/twisted/internet/tcp.py", line 243, in doRead
return self._dataReceived(data)
File "/home/sinnx3/.local/lib/python2.7/site-packages/twisted/internet/tcp.py", line 249, in _dataReceived
rval = self.protocol.dataReceived(data)
File "/home/sinnx3/p2pool-bch/p2pool/util/p2protocol.py", line 27, in dataReceived
self.dataReceived2(data)
File "/home/sinnx3/p2pool-bch/p2pool/util/datachunker.py", line 40, in _DataChunker
wants = receiver.send(buf.get(wants))
--- <exception caught here> ---
File "/home/sinnx3/p2pool-bch/p2pool/util/p2protocol.py", line 57, in dataReceiver
self.packetReceived(command, type_.unpack(payload, self.ignore_trailing_payload))
File "/home/sinnx3/p2pool-bch/p2pool/util/pack.py", line 55, in unpack
obj = self._unpack(data, ignore_trailing)
File "/home/sinnx3/p2pool-bch/p2pool/util/pack.py", line 42, in _unpack
obj = self.read(data)
File "/home/sinnx3/p2pool-bch/p2pool/util/pack.py", line 280, in read
item[key] = type_.read(file)
File "/home/sinnx3/p2pool-bch/p2pool/util/pack.py", line 157, in read
res = [self.type.read(file) for i in xrange(length)]
File "/home/sinnx3/p2pool-bch/p2pool/util/pack.py", line 280, in read
item[key] = type_.read(file)
File "/home/sinnx3/p2pool-bch/p2pool/util/pack.py", line 139, in read
raise ValueError('enum data (%r) not in pack_to_unpack (%r)' % (data, self.pack_to_unpack))
exceptions.ValueError: enum data (38048) not in pack_to_unpack ({1: 'tx', 2: 'block'})
Error after my self-debug attempt:
2025-02-24 19:46:32.903116 ('[ERROR] Unexpected enum data received:', 38048)
2025-02-24 19:46:32.903217 ('[INFO] Expected values:', [1, 2])
2025-02-24 19:46:32.903243 ('[DEBUG] Hex representation of data:', '0x94a0')
2025-02-24 19:46:32.903271 ('[DEBUG] Raw file data:', '*\x10G,\xe4A%\xf3\xdaQ!l(\xe0\xbe\xc0\xeb\xc3\xe3u\xaf\xf4\xe4j,;%\xdeP`\xd1\xd4')
2025-02-24 19:46:32.903332 RECV inv 01a09400002a10472ce44125f3da51216c28e0bec0ebc3e375aff4e46a2c3b25de5060d1d4
Error handling message: (see RECV line)
Traceback (most recent call last):
File "/home/sinnx3/.local/lib/python2.7/site-packages/twisted/internet/tcp.py", line 243, in doRead
return self._dataReceived(data)
File "/home/sinnx3/.local/lib/python2.7/site-packages/twisted/internet/tcp.py", line 249, in _dataReceived
rval = self.protocol.dataReceived(data)
File "/home/sinnx3/p2pool-bch/p2pool/util/p2protocol.py", line 27, in dataReceived
self.dataReceived2(data)
File "/home/sinnx3/p2pool-bch/p2pool/util/datachunker.py", line 40, in _DataChunker
wants = receiver.send(buf.get(wants))
--- <exception caught here> ---
File "/home/sinnx3/p2pool-bch/p2pool/util/p2protocol.py", line 57, in dataReceiver
self.packetReceived(command, type_.unpack(payload, self.ignore_trailing_payload))
File "/home/sinnx3/p2pool-bch/p2pool/util/pack.py", line 55, in unpack
obj = self._unpack(data, ignore_trailing)
File "/home/sinnx3/p2pool-bch/p2pool/util/pack.py", line 42, in _unpack
obj = self.read(data)
File "/home/sinnx3/p2pool-bch/p2pool/util/pack.py", line 284, in read
item[key] = type_.read(file)
File "/home/sinnx3/p2pool-bch/p2pool/util/pack.py", line 161, in read
res = [self.type.read(file) for i in xrange(length)]
File "/home/sinnx3/p2pool-bch/p2pool/util/pack.py", line 284, in read
item[key] = type_.read(file)
File "/home/sinnx3/p2pool-bch/p2pool/util/pack.py", line 143, in read
raise ValueError('enum data (%r) not in pack_to_unpack (%r)' % (data, self.pack_to_unpack))
exceptions.ValueError: enum data (38048) not in pack_to_unpack ({1: 'tx', 2: 'block'})
I tried to self-debug the error I was occasionally receiving in p2pool logs and this is the printout.
It's not a script breaker as p2pool runs fine even after it but isn't this something to patch?
Unfortunately I don't know much code so this is just jargon to me but maybe it'll be of some help to others if they feel that they want to fix.
OS:
Ubuntu 18.04.6P2Pool Branch:
https://github.com/jtoomim/p2pool/tree/rawtxBCHN Wallet Version:
Bitcoin Cash Node Daemon version v28.0.1-631badbf6Original Error:
Error after my self-debug attempt: