Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't access Chia #18861

Open
apdredds opened this issue Nov 13, 2024 · 9 comments
Open

Can't access Chia #18861

apdredds opened this issue Nov 13, 2024 · 9 comments

Comments

@apdredds
Copy link

Hi

I have Chia 2.4.3 and the log in doesn't load. It stays on this screen attached. I did report the issue before but couldn't get any help on my side. I was asked from your team to provide a log file from ~/.chia/mainnet/log/debug.log. How do i do this?

Kind regards

Asiyah
Chia screenshot

@BrandtH22
Copy link
Contributor

Hey @apdredds , as a heads up we can generally provide more timely and thorough support in our discord server (https://discord.gg/chia).

The .chia directory is hidden and generally in your users folder.

MAC: open finder, click COMMAND + SHIFT + . (period) to show hidden files, look for the folder with your username and the .chia folder will be in there. Follow the rest of the file path to find the debug file.

WINDOWS / LINUX: open file explorer and with the view options enable hidden files. Then go to your user folder and look for the .chia folder. Follow the rest of the file path to find the debug file.

@apdredds
Copy link
Author

apdredds commented Nov 13, 2024 via email

@BrandtH22
Copy link
Contributor

Thank you @apdredds , the logs show RuntimeError: BlockStore does not support database schema v1 which is that second potential problem I mentioned. There are two methods to upgrade from the v1 to the v2 database based on how much space you have available on your drive.

Let us know if you run into any issues or have questions while going through the below.

If you have ~500GB+ available I recommend using the CLI method but if you do not have that much space then I recommend the torrent option:

Steps for the CLI command:

  1. Stop the chia client (this can be done while chia is running but stopping the client saves from any potential issues)
  2. Run the command chia db upgrade (you do not need the input or output paths if these are still default)
  • This process will take some time and requires additional space as the v1 db is compacted into the v2 db which leaves the v1 db intact
  1. Verify the config file (~\.chia\mainnet\config\config.yaml) has the correct value under the full_node section for database_path: db/blockchain_v2_CHALLENGE.sqlite (should only need to change the v1 to v2)
  2. After the above completes start the chia client
  3. If all loads up properly (might take upwards of 30 minutes to load) then you can safely delete the v1 db found here (~\.chia\mainnet\db\blockchain_v1_mainnet.sqlite)

Steps for using the torrent:

  1. Download the torrent file from https://www.chia.net/downloads/#database-checkpoint
  2. Use a torrent client to download the full db
  3. Unpack/reassemble the torrent file that was downloaded (on windows I used 7zip, Mac and linux have built in tools that work for this)
  4. Stop chia entirely then move the db to the correct folder (~\.chia\mainnet\db\) and update the name to "blockchain_v2_mainnet.sqlite" (removing the date information in the name)
  5. Verify the config file (~\.chia\mainnet\config\config.yaml) has the correct value under the full_node section for database_path: db/blockchain_v2_CHALLENGE.sqlite (should only need to change the v1 to v2)
  6. Launch chia and wait for a bit (the height to hash and peers files need to be built so this can take upwards of 30 minutes)

@apdredds
Copy link
Author

apdredds commented Nov 13, 2024 via email

@BrandtH22
Copy link
Contributor

Hey @apdredds , what torrent client did you use to download the files?

@apdredds
Copy link
Author

apdredds commented Nov 13, 2024 via email

@BrandtH22
Copy link
Contributor

@apdredds , you need to have a torrent client to download the files. Personally I have used qbittorrent in the past with success. The mainnet file that ends in .torrent needs to be opened with a torrent client (this is what downloads the actual files). It will take some time to download but then you will have a .tar.gz file that needs to be unpacked with 7-zip so just need to do the torrent download step then you can get to unpacking 👍

@apdredds
Copy link
Author

apdredds commented Nov 14, 2024 via email

@Taka-Tim
Copy link

I have a similar problem, after update to ver. 2.4.4:

image

2024-11-16T00:14:44.945 2.4.4 full_node chia.server.start_service: ERROR fatal uncaught exception: DatabaseError: database disk image is malformed
Traceback (most recent call last):
File "chia\util\log_exceptions.py", line 20, in log_exceptions
File "chia\server\start_service.py", line 328, in async_run
File "asyncio\runners.py", line 44, in run
File "asyncio\base_events.py", line 649, in run_until_complete
File "chia\server\start_full_node.py", line 85, in async_main
File "chia\server\start_service.py", line 202, in run
File "contextlib.py", line 199, in aenter
File "chia\server\start_service.py", line 219, in manage
File "contextlib.py", line 619, in enter_async_context
File "contextlib.py", line 199, in aenter
File "chia\full_node\full_node.py", line 270, in manage
File "chia\consensus\blockchain.py", line 160, in create
File "chia\consensus\blockchain.py", line 172, in _load_chain_from_store
File "chia\full_node\block_height_map.py", line 133, in create
File "chia\full_node\block_height_map.py", line 199, in _load_blocks_from
File "aiosqlite\cursor.py", line 76, in fetchall
File "aiosqlite\cursor.py", line 40, in _execute
File "aiosqlite\core.py", line 132, in _execute
File "aiosqlite\core.py", line 115, in run
sqlite3.DatabaseError: database disk image is malformed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants