jtoomim / p2pool

Peer-to-peer Bitcoin mining pool
https://github.com/jtoomim/p2pool/
GNU General Public License v3.0
37 stars 45 forks source link

"segwit transaction included before activation" Error when starting a new BTC ShareChain #54

Closed ikolubr closed 3 years ago

ikolubr commented 3 years ago

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.

ikolubr commented 3 years ago

Traceback (most recent call last):
  File "/root/p2pool/p2pool/main.py", line 713, 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 "/root/p2pool/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 "/root/p2pool/p2pool/bitcoin/worker_interface.py", line 132, in get_work
    desired_pseudoshare_target, worker_ip, *args)
  File "/root/p2pool/p2pool/work.py", line 364, in get_work
    base_subsidy=self.node.net.PARENT.SUBSIDY_FUNC(self.current_work.value['height']),
  File "/root/p2pool/p2pool/data.py", line 294, in generate_transaction
    raise ValueError('segwit transaction included before activation')
exceptions.ValueError: segwit transaction included before activation```
frstrtr commented 3 years ago

Do you use worker names or difficulty adjustment parameters? If so can you provide your miner parameters string?

ikolubr commented 3 years ago

Do you use worker names or difficulty adjustment parameters? If so can you provide your miner parameters string?

It is not that. I changed the SEGWIT_ACTIVATION_VERSION = 33 to 17 and that did the trick! It is happily hashing.