spesmilo / spesmilo/electrum

Exception: cannot initialize transaction from {'tx_hash': '04ffde0c00e7f43daabd78ed29289d79482568a62aa03741b7e24932527a8931', 'inputs': [{'sequence': 4294967295, 'prevout_hash': '26bb16c6e44a105ddc963ea052668ce1d4990fc22d5bcb2c998c3a348cfea699', 'address': '1C2schGUPt2JDKhxMNRMw3eQov2FMpTpR', 'prevout_n': 0}], 'outputs': [{'index': 0, 'raw_output_script': '76a914d5892072b3b0a47568cf8ba75970cd40d1a...

Open
#7,706 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
8.6k
Forks
3.5k
Avg merge
2d 8h
Merged PRs (30d)
61

Description

Crash Report

This crash report was reported through the automatic crash reporting system 🤖

Traceback

Traceback (most recent call last):
  File "/tmp/.mount_electrqsnUw0/usr/lib/python3.7/site-packages/electrum/gui/qt/__init__.py", line 418, in main
    if not self.start_new_window(path, self.config.get('url'), app_is_starting=True):
  File "/tmp/.mount_electrqsnUw0/usr/lib/python3.7/site-packages/electrum/gui/qt/__init__.py", line 292, in wrapper
    return func(self, *args, **kwargs)
  File "/tmp/.mount_electrqsnUw0/usr/lib/python3.7/site-packages/electrum/gui/qt/__init__.py", line 317, in start_new_window
    wallet = self._start_wizard_to_select_or_create_wallet(path)
  File "/tmp/.mount_electrqsnUw0/usr/lib/python3.7/site-packages/electrum/gui/qt/__init__.py", line 362, in _start_wizard_to_select_or_create_wallet
    db = WalletDB(storage.read(), manual_upgrades=False)
  File "/tmp/.mount_electrqsnUw0/usr/lib/python3.7/site-packages/electrum/wallet_db.py", line 73, in __init__
    self.load_data(raw)
  File "/tmp/.mount_electrqsnUw0/usr/lib/python3.7/site-packages/electrum/wallet_db.py", line 106, in load_data
    self.upgrade()
  File "/tmp/.mount_electrqsnUw0/usr/lib/python3.7/site-packages/electrum/util.py", line 420, in <lambda>
    return lambda *args, **kw_args: do_profile(args, kw_args)
  File "/tmp/.mount_electrqsnUw0/usr/lib/python3.7/site-packages/electrum/util.py", line 416, in do_profile
    o = func(*args, **kw_args)
  File "/tmp/.mount_electrqsnUw0/usr/lib/python3.7/site-packages/electrum/wallet_db.py", line 168, in upgrade
    self._convert_version_17()
  File "/tmp/.mount_electrqsnUw0/usr/lib/python3.7/site-packages/electrum/wallet_db.py", line 399, in _convert_version_17
    tx = Transaction(raw_tx)
  File "/tmp/.mount_electrqsnUw0/usr/lib/python3.7/site-packages/electrum/transaction.py", line 547, in __init__
    raise Exception(f"cannot initialize transaction from {raw}")
Exception: cannot initialize transaction from {'tx_hash': '04ffde0c00e7f43daabd78ed29289d79482568a62aa03741b7e24932527a8931', 'inputs': [{'sequence': 4294967295, 'prevout_hash': '26bb16c6e44a105ddc963ea052668ce1d4990fc22d5bcb2c998c3a348cfea699', 'address': '1C2schGUPt2JDKhxMNRMw3eQov2FMpTpR', 'prevout_n': 0}], 'outputs': [{'index': 0, 'raw_output_script': '76a914d5892072b3b0a47568cf8ba75970cd40d1adfeeb88ac', 'value': 5050000, 'address': '1LU5CbRbCNvudnNZn1Uva3qebGyiH9YjgJ'}], 'height': 309179, 'version': 1, 'lockTime': 0}

Exception: cannot initialize transaction from {'tx_hash': '04ffde0c00e7f43daabd78ed29289d79482568a62aa03741b7e24932527a8931', 'inputs': [{'sequence': 4294967295, 'prevout_hash': '26bb16c6e44a105ddc963ea052668ce1d4990fc22d5bcb2c998c3a348cfea699', 'address': '1C2schGUPt2JDKhxMNRMw3eQov2FMpTpR', 'prevout_n': 0}], 'outputs': [{'index': 0, 'raw_output_script': '76a914d5892072b3b0a47568cf8ba75970cd40d1adfeeb88ac', 'value': 5050000, 'address': '1LU5CbRbCNvudnNZn1Uva3qebGyiH9YjgJ'}], 'height': 309179, 'version': 1, 'lockTime': 0}

Reporter

This issue was reported by 1 user(s):

Electrum Version Python Version Operating System Wallet Type Locale Stack
4.1.5 3.7.10 (default, Jun 28 2018, 19:01:02) [GCC 5.4.0 20160609] Linux-5.9.0-050900-generic-x86_64-with-debian-buster-sid en_GB

Additional Information

The reporting user(s) did not provide additional information.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with electrum/wallet_db.py at _convert_version_17 and trace how its stored transaction data is passed to electrum/transaction.py during wallet loading. Reproduce the upgrade failure with the reported transaction data and determine what successful wallet migration and transaction initialization should look like.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
blockchain, desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.