chia-blockchain: DB update error

What happened?

I checked it three times and on different computers, there is always an error on phase 5. Python 3.7 and 3.9 OS: Ubuntu 18.04 and Slackware 15.0

Version

1.3.0

What platform are you using?

Linux

What ui mode are you using?

CLI

Relevant log output

[1/5] converting full_blocks
      25195.98 seconds                             
[2/5] converting sub_epoch_segments_v3
      101.57 seconds                             
[3/5] converting hint_store
      6495.97 seconds                             
[4/5] converting coin_store
     32202k coins 2509.2 coins/s  Traceback (most recent call last):
  File "chia-blockchain/venv/bin/chia", line 33, in <module>
    sys.exit(load_entry_point('chia-blockchain', 'console_scripts', 'chia')())
  File "chia-blockchain/chia/cmds/chia.py", line 148, in main
    cli()  # pylint: disable=no-value-for-parameter
  File "chia-blockchain/venv/lib/python3.7/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "chia-blockchain/venv/lib/python3.7/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "chia-blockchain/venv/lib/python3.7/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "chia-blockchain/venv/lib/python3.7/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "chia-blockchain/venv/lib/python3.7/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "chia-blockchain/venv/lib/python3.7/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "chia-blockchain/venv/lib/python3.7/site-packages/click/decorators.py", line 21, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "chia-blockchain/chia/cmds/db.py", line 32, in db_upgrade_cmd
    no_update_config,
  File "chia-blockchain/chia/cmds/db_upgrade_func.py", line 43, in db_upgrade_func
    convert_v1_to_v2(in_db_path, out_db_path)
  File "chia-blockchain/chia/cmds/db_upgrade_func.py", line 317, in convert_v1_to_v2
    bytes.fromhex(row[0]),
ValueError: non-hexadecimal number found in fromhex() arg at position 4

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 18 (7 by maintainers)

Most upvoted comments

also, if you’re syncing a new DB from scratch, chia init will create a v2 database by default

it’s incredible. Same PC, same db, same size of tmpfs, same sdd and I did it 😃 But I did full DB check. I don’t know how, but it works)))

initializing v2 version initializing v2 block store height: 1689665 [1/5] converting full_blocks 587.28 seconds
[2/5] converting sub_epoch_segments_v3 8.30 seconds
[3/5] converting hint_store 12.69 seconds
[4/5] converting coin_store 1720.70 seconds
[5/5] build indices block store coin store hint store 411.11 seconds
updating config.yaml database_path: db/blockchain_v2_CHALLENGE.sqlite

LEAVING PREVIOUS DB FILE UNTOUCHED blockchain_v1_mainnet.sqlite