Chia-Network / chia-blockchain

Chia blockchain python implementation (full node, farmer, harvester, timelord, and wallet)
Apache License 2.0
10.82k stars 2.03k forks source link

[Bug] Plots not detected in GUI and infinitely loading farming data #14245

Closed justnatural closed 8 months ago

justnatural commented 1 year ago

What happened?

I recently rejoined the chia project after about 1 year. I had an old PC which was used as a harvester after some old tutorial I did back then. I would like to use this as the main farmer PC now since I don't use the other old main farmer PC. I connected some usb external drives which had some plots on them. I updated my app to the latest version 1.6.1 , moved the chia DB to another drive cause C was too low on space (followed this tutorial: https://thechiaplot.net/2022/02/12/how-to-move-your-chia-database-to-a-new-disk/) and waited for the blockchain to sync. Now the blockchain is synced after 3 days waiting but still in the Farming section I see an infinitely loading spinner animation with the text Loading farming data and in the Plots section I added the plots but nothing is showing in the list.

image image

My chia.exe program is in C:\Users\username\AppData\Local\Programs\Chia\resources\app.asar.unpacked\daemon

In the command Prompt CLI I ran the command "chia plots check" and got proofs, but according to this article: https://github.com/Chia-Network/chia-blockchain/wiki/How-to-Check-If-Everything-is-Working-(or-Not) The time it takes to do a proof challenge should be below 30 seconds. If I see higher times, something is wrong with my setup.

I keep getting results like this which means that something is wrong with the setup. but I don't know what. NOTE that most of my plots are OLD plots from before the update that enabled native pooling on the blockchain :

2022-12-30T15:53:38.763 chia.plotting.check_plots : INFO Looking up qualities took: 138 ms. 2022-12-30T15:53:39.537 chia.plotting.check_plots : INFO Finding proof took: 773 ms 2022-12-30T15:53:39.645 chia.plotting.check_plots : INFO Looking up qualities took: 76 ms. 2022-12-30T15:53:40.332 chia.plotting.check_plots : INFO Finding proof took: 687 ms 2022-12-30T15:53:40.437 chia.plotting.check_plots : INFO Looking up qualities took: 88 ms. 2022-12-30T15:53:41.242 chia.plotting.check_plots : INFO Finding proof took: 805 ms 2022-12-30T15:53:41.379 chia.plotting.check_plots : INFO Looking up qualities took: 106 ms. 2022-12-30T15:53:42.116 chia.plotting.check_plots : INFO Finding proof took: 735 ms 2022-12-30T15:53:42.233 chia.plotting.check_plots : INFO Looking up qualities took: 116 ms. 2022-12-30T15:53:43.094 chia.plotting.check_plots : INFO Finding proof took: 861 ms 2022-12-30T15:53:43.289 chia.plotting.check_plots : INFO Looking up qualities took: 194 ms. 2022-12-30T15:53:44.003 chia.plotting.check_plots : INFO Finding proof took: 713 ms 2022-12-30T15:53:44.004 chia.plotting.check_plots : INFO Looking up qualities took: 0 ms. 2022-12-30T15:53:44.696 chia.plotting.check_plots : INFO Finding proof took: 691 ms 2022-12-30T15:53:44.818 chia.plotting.check_plots : INFO Looking up qualities took: 84 ms. 2022-12-30T15:53:45.545 chia.plotting.check_plots : INFO Finding proof took: 725 ms 2022-12-30T15:53:45.698 chia.plotting.check_plots : INFO Looking up qualities took: 151 ms. 2022-12-30T15:53:46.345 chia.plotting.check_plots : INFO Finding proof took: 645 ms 2022-12-30T15:53:46.347 chia.plotting.check_plots : INFO Looking up qualities took: 0 ms. 2022-12-30T15:53:46.981 chia.plotting.check_plots : INFO Finding proof took: 632 ms 2022-12-30T15:53:47.085 chia.plotting.check_plots : INFO Looking up qualities took: 102 ms. 2022-12-30T15:53:47.881 chia.plotting.check_plots : INFO Finding proof took: 796 ms 2022-12-30T15:53:48.057 chia.plotting.check_plots : INFO Looking up qualities took: 175 ms. 2022-12-30T15:53:48.736 chia.plotting.check_plots : INFO Finding proof took: 678 ms 2022-12-30T15:53:48.737 chia.plotting.check_plots : INFO Looking up qualities took: 0 ms.

I ran all these commands in the Windows powershell from the root location of the chia.exe and they returned no result in the command line: Select-String -Path “~.chia\mainnet\log\debug” -Pattern “eligible” Select-String -Path “~.chia\mainnet\log\debug” -Pattern “Found [^0] proof” Select-String -Path “~.chia\mainnet\log\debug*” -Pattern “Farmed unfinished_block” Get-Content -Path "~.chia\mainnet\log\debug.log" -Wait | Select-String -Pattern "found"

In the debug.log file located at C:\Users\username.chia\mainnet\log I searched for the ERROR string in reverse chronological error and found lines which I will post in the "Relevant log output" section. I will also post some nearby warnings just in case they give more info.

Can someone give me some advice on how to fix this mess?

Version

1.6.1

What platform are you using?

Windows

What ui mode are you using?

GUI

Relevant log output

2022-12-28T19:29:29.149 full_node chia.full_node.full_node: WARNING  Block pre-validation time: 10.47 seconds (32 blocks, start height: 2256289)
2022-12-28T20:00:59.972 wallet chia.wallet.wallet_node    : WARNING  Peer {'host': '183.x.x.x', 'port': 8444} did not respond in time.
2022-12-28T20:54:36.354 wallet chia.wallet.wallet_node    : WARNING  Peer {'host': '75.x.x.x', 'port': 8444} did not respond in time.
2022-12-28T20:54:54.888 full_node chia.full_node.full_node: ERROR    Exception fetching 2294720 to 2294752 from peer list.remove(x): x not in list
2022-12-28T21:55:54.085 wallet chia.wallet.wallet_node    : WARNING  Peer {'host': '202.x.x.x', 'port': 8444} did not respond in time.
2022-12-28T21:56:36.806 wallet chia.wallet.wallet_node    : WARNING  Peer None did not respond in time.
2022-12-28T22:01:39.636 wallet chia.wallet.wallet_node    : WARNING  Peer {'host': '85.x.x.x', 'port': 8444} did not respond in time.
2022-12-28T22:56:57.888 wallet chia.wallet.wallet_node    : WARNING  Peer {'host': '45.x.x.x', 'port': 8444} did not respond in time.
2022-12-29T02:17:08.843 wallet chia.wallet.wallet_node    : WARNING  Peer {'host': '109.x.x.x', 'port': 8444} did not respond in time.
2022-12-29T03:08:57.555 wallet chia.wallet.wallet_node    : WARNING  Peer {'host': '88.x.x.x', 'port': 8444} did not respond in time.
2022-12-29T03:10:15.669 wallet chia.wallet.wallet_node    : WARNING  Peer {'host': '2.x.x.x', 'port': 8444} did not respond in time.
2022-12-29T03:55:28.339 full_node chia.full_node.full_node: ERROR    Exception fetching 2486176 to 2486208 from peer list.remove(x): x not in list
2022-12-29T04:37:58.407 wallet chia.wallet.wallet_node    : WARNING  Peer {'host': '168.x.x.x', 'port': 8444} did not respond in time.
2022-12-29T04:48:49.229 wallet chia.wallet.wallet_node    : WARNING  Peer {'host': '60.x.x.x', 'port': 8444} did not respond in time.
2022-12-29T07:18:02.806 wallet chia.wallet.wallet_node    : WARNING  Peer {'host': '136.x.x.x', 'port': 8444} did not respond in time.
2022-12-29T17:06:15.485 wallet chia.wallet.wallet_node    : WARNING  Peer {'host': '96.x.x.x', 'port': 8444} did not respond in time.
2022-12-29T19:09:19.878 full_node chia.full_node.full_node: WARNING  Block pre-validation time: 11.09 seconds (32 blocks, start height: 2925569)
2022-12-29T19:21:24.125 full_node chia.full_node.full_node: WARNING  Block pre-validation time: 10.23 seconds (32 blocks, start height: 2929057)
2022-12-29T19:21:38.093 full_node chia.full_node.full_node: WARNING  Block pre-validation time: 11.14 seconds (32 blocks, start height: 2929089)
2022-12-29T19:51:11.631 wallet chia.wallet.wallet_node    : WARNING  Peer {'host': '88.x.x.x', 'port': 8444} did not respond in time.
2022-12-29T20:50:25.524 wallet chia.wallet.wallet_node    : WARNING  Peer None did not respond in time.
2022-12-29T22:36:02.934 full_node chia.full_node.full_node: WARNING  Block pre-validation time: 11.53 seconds (32 blocks, start height: 3001921)
2022-12-29T22:45:37.807 full_node chia.full_node.full_node: WARNING  Block pre-validation time: 10.03 seconds (32 blocks, start height: 3003585)
2022-12-29T22:48:57.446 wallet chia.wallet.wallet_node    : WARNING  Peer {'host': '212.x.x.x', 'port': 8444} did not respond in time.

2022-12-30T14:59:42.334 full_node chia.full_node.mempool  : WARNING  Fee estimator error
2022-12-30T14:59:42.335 full_node chia.full_node.mempool  : WARNING  Fee estimator error
2022-12-30T14:59:42.335 full_node chia.full_node.mempool  : WARNING  Fee estimator error
2022-12-30T14:59:42.540 wallet Profile 1                  : WARNING  Can't select 1, from spendable 0 for wallet id 9
2022-12-30T14:59:46.434 full_node chia.full_node.full_node: WARNING  Time for header validate: 0.02398681640625
2022-12-30T14:59:57.071 full_node chia.full_node.full_node: WARNING  Time for header validate: 0.02298760414123535
2022-12-30T15:00:16.120 full_node chia.full_node.full_node: WARNING  Time for header validate: 0.02297687530517578
2022-12-30T15:00:30.627 full_node chia.full_node.mempool  : WARNING  Fee estimator error
2022-12-30T15:00:30.627 full_node chia.full_node.mempool  : WARNING  Fee estimator error
2022-12-30T15:00:30.627 full_node chia.full_node.mempool  : WARNING  Fee estimator error
2022-12-30T15:00:30.628 full_node chia.full_node.mempool  : WARNING  Fee estimator error
2022-12-30T15:00:30.628 full_node chia.full_node.mempool  : WARNING  Fee estimator error
2022-12-30T15:00:30.629 full_node chia.full_node.mempool  : WARNING  Fee estimator error
2022-12-30T15:00:30.629 full_node chia.full_node.mempool  : WARNING  Fee estimator error
2022-12-30T15:00:30.630 full_node chia.full_node.mempool  : WARNING  Fee estimator error
2022-12-30T15:00:30.630 full_node chia.full_node.mempool  : WARNING  Fee estimator error
2022-12-30T15:00:30.630 full_node chia.full_node.mempool  : WARNING  Fee estimator error
2022-12-30T15:00:30.631 full_node chia.full_node.mempool  : WARNING  Fee estimator error
2022-12-30T15:00:30.631 full_node chia.full_node.mempool  : WARNING  Fee estimator error
2022-12-30T15:00:30.698 wallet chia.pools.pool_puzzles    : ERROR    Unexpected return from PoolWallet Smart Contract code cannot unpack non-iterable int object
2022-12-30T15:01:28.475 full_node chia.full_node.full_node: WARNING  Time for header validate: 0.018990516662597656
2022-12-30T15:01:29.237 full_node chia.full_node.full_node: WARNING  Time for header validate: 0.018989086151123047
2022-12-30T15:02:00.357 full_node chia.full_node.mempool  : WARNING  Fee estimator error
2022-12-30T15:02:00.357 full_node chia.full_node.mempool  : WARNING  Fee estimator error
shaneo257 commented 1 year ago

under your config.yaml do you have any plot directories listed?

justnatural commented 1 year ago

under your config.yaml do you have any plot directories listed?

Yes, I have all locations declared for example like this: plot_directories:

justnatural commented 1 year ago

I just updated to 1.6.2 and the issues are still occurring.

emlowe commented 1 year ago

I would recommend trying some CLI commands - on Windows you can find this (by default) at C:\Users\[you]\AppData\Local\Programs\chia\ resources\app.asar.unpacked\daemon

I would try

chia farm summary chia plotnft show

You could also try to resync your wallet db. Stop chia, move your current wallet db out of the way, and restart chia. The wallet db is located under ~/.chia/mainnet/wallet/db

justnatural commented 1 year ago

I would recommend trying some CLI commands - on Windows you can find this (by default) at C:\Users\[you]\AppData\Local\Programs\chia\ resources\app.asar.unpacked\daemon

I would try

chia farm summary chia plotnft show

chia farm summary

Farming status: Farming Total chia farmed: 6.001552964055 User transaction fees: 0.001552964055 Block rewards: 6.0 Last height farmed: 1764775 Plot count for all harvesters: 0 Total size of plots: 0.000 MiB Estimated network space: 20.487 EiB Expected time to win: Never (no plots) Note: log into your key using 'chia wallet show' to see rewards for each key

chia plotnft show

Wallet height: 3086989 Sync status: Synced

Not much info here...

You could also try to resync your wallet db. Stop chia, move your current wallet db out of the way, and restart chia. The wallet db is located under ~/.chia/mainnet/wallet/db

I also tried this - the /wallet/db folder and it's contents got recreated after restarting chia but it had no effect to resolve the issues.

emlowe commented 1 year ago

Well - please do a chia wallet show in order to get your wallet sync started. - But

Plot count for all harvesters: 0
Total size of plots: 0.000 MiB

would seem to indicate a problem.

What happens when you do chia plots check?

justnatural commented 1 year ago

Well - please do a chia wallet show in order to get your wallet sync started. - But

chia wallet show Shows

Wallet height: 3096608 Sync status: Synced Balances, fingerprint: xxxxxxxxxxx + Chia Wallet balance and type Chia Holiday 2021 Token balance and type NFT Wallet balance and type DID did:chia (balance and type) + Connections: Type IP Ports NodeID Last Connect MiB Up|Dwn FULL_NODE 127.0.0.1 8444/8444 eb2de5be... Jan 12 19:01:15 0.1|6.1 -Height: No Info -Hash: No Info -Trusted: True

What happens when you do chia plots check?

If I do chia plots check

...
2023-01-12T19:05:41.881  chia.plotting.check_plots        : INFO     Starting to test each plot with 30 challenges each

2023-01-12T19:05:41.882  chia.plotting.check_plots        : INFO     Testing plot F:\ChiaPlotsFarm\xxxxxxxxxxxxxxxxxx.plot k=32
2023-01-12T19:05:41.894  chia.plotting.check_plots        : INFO        Pool public key:        xxxxxxxxxxxxxxxxxxxxxxxxx
2023-01-12T19:05:41.908  chia.plotting.check_plots        : INFO        Farmer public key:      xxxxxxxxxxxxxxxxxxxxx
2023-01-12T19:05:41.909  chia.plotting.check_plots        : INFO        Local sk:               <PrivateKey xxxxxxxxxxxxxxxxxxxxxxxxxx>
2023-01-12T19:05:42.278  chia.plotting.check_plots        : INFO        Looking up qualities took: 366 ms.
2023-01-12T19:05:43.019  chia.plotting.check_plots        : INFO        Finding proof took: 740 ms
2023-01-12T19:05:43.020  chia.plotting.check_plots        : INFO        Looking up qualities took: 0 ms.
2023-01-12T19:05:43.691  chia.plotting.check_plots        : INFO        Finding proof took: 670 ms
2023-01-12T19:05:43.869  chia.plotting.check_plots        : INFO        Looking up qualities took: 175 ms.
2023-01-12T19:05:44.549  chia.plotting.check_plots        : INFO        Finding proof took: 679 ms
2023-01-12T19:05:44.551  chia.plotting.check_plots        : INFO        Looking up qualities took: 0 ms.
2023-01-12T19:05:45.286  chia.plotting.check_plots        : INFO        Finding proof took: 735 ms
2023-01-12T19:05:45.451  chia.plotting.check_plots        : INFO        Looking up qualities took: 164 ms.
2023-01-12T19:05:46.059  chia.plotting.check_plots        : INFO        Finding proof took: 607 ms
2023-01-12T19:05:46.060  chia.plotting.check_plots        : INFO        Looking up qualities took: 0 ms.
2023-01-12T19:05:46.826  chia.plotting.check_plots        : INFO        Finding proof took: 766 ms
2023-01-12T19:05:46.944  chia.plotting.check_plots        : INFO        Looking up qualities took: 88 ms.
2023-01-12T19:05:47.629  chia.plotting.check_plots        : INFO        Finding proof took: 684 ms
2023-01-12T19:05:47.700  chia.plotting.check_plots        : INFO        Looking up qualities took: 68 ms.
2023-01-12T19:05:48.359  chia.plotting.check_plots        : INFO        Finding proof took: 657 ms
2023-01-12T19:05:48.512  chia.plotting.check_plots        : INFO        Looking up qualities took: 92 ms.
2023-01-12T19:05:49.265  chia.plotting.check_plots        : INFO        Finding proof took: 751 ms
2023-01-12T19:05:49.354  chia.plotting.check_plots        : INFO        Looking up qualities took: 85 ms.
2023-01-12T19:05:50.046  chia.plotting.check_plots        : INFO        Finding proof took: 691 ms
2023-01-12T19:05:50.169  chia.plotting.check_plots        : INFO        Looking up qualities took: 93 ms.
2023-01-12T19:05:50.782  chia.plotting.check_plots        : INFO        Finding proof took: 612 ms
2023-01-12T19:05:50.943  chia.plotting.check_plots        : INFO        Looking up qualities took: 157 ms.
2023-01-12T19:05:51.640  chia.plotting.check_plots        : INFO        Finding proof took: 693 ms
2023-01-12T19:05:51.644  chia.plotting.check_plots        : INFO        Looking up qualities took: 0 ms.
2023-01-12T19:05:52.323  chia.plotting.check_plots        : INFO        Finding proof took: 677 ms
2023-01-12T19:05:52.510  chia.plotting.check_plots        : INFO        Looking up qualities took: 165 ms.
2023-01-12T19:05:53.194  chia.plotting.check_plots        : INFO        Finding proof took: 677 ms
2023-01-12T19:05:53.196  chia.plotting.check_plots        : INFO        Looking up qualities took: 0 ms.
2023-01-12T19:05:53.842  chia.plotting.check_plots        : INFO        Finding proof took: 646 ms
2023-01-12T19:05:54.022  chia.plotting.check_plots        : INFO        Looking up qualities took: 99 ms.
2023-01-12T19:05:54.730  chia.plotting.check_plots        : INFO        Finding proof took: 707 ms
2023-01-12T19:05:54.857  chia.plotting.check_plots        : INFO        Looking up qualities took: 90 ms.
2023-01-12T19:05:55.560  chia.plotting.check_plots        : INFO        Finding proof took: 702 ms
2023-01-12T19:05:55.652  chia.plotting.check_plots        : INFO        Looking up qualities took: 91 ms.
2023-01-12T19:05:56.300  chia.plotting.check_plots        : INFO        Finding proof took: 646 ms
2023-01-12T19:05:56.503  chia.plotting.check_plots        : INFO        Looking up qualities took: 201 ms.
2023-01-12T19:05:57.204  chia.plotting.check_plots        : INFO        Finding proof took: 699 ms
2023-01-12T19:05:57.206  chia.plotting.check_plots        : INFO        Looking up qualities took: 0 ms.
2023-01-12T19:05:57.944  chia.plotting.check_plots        : INFO        Finding proof took: 737 ms
2023-01-12T19:05:58.063  chia.plotting.check_plots        : INFO        Looking up qualities took: 118 ms.
2023-01-12T19:05:58.782  chia.plotting.check_plots        : INFO        Finding proof took: 717 ms
2023-01-12T19:05:58.907  chia.plotting.check_plots        : INFO        Looking up qualities took: 102 ms.
2023-01-12T19:05:59.598  chia.plotting.check_plots        : INFO        Finding proof took: 687 ms
2023-01-12T19:05:59.637  chia.plotting.check_plots        : INFO        Proofs 22 / 30, 0.7333

This is the first one as an example, it keeps doing this for every plot.

Finding proofs takes too long. Around 700 ms on average. What could be the cause for this?

MumfMeisterT commented 1 year ago

If you want to go down to using one machine instead of two, you'll have to point the harvesters to local_host. An alternative would be to regenerate config. Best way would be to run chia stop all -d and then delete your config folder and then restart chia and repopulate your plot folders.

justnatural commented 1 year ago

If you want to go down to using one machine instead of two, you'll have to point the harvesters to local_host

I had no idea how to do that so I skipped ahead to your other point.

An alternative would be to regenerate config.

I had no idea how to do that so I skipped ahead to your other point.

Best way would be to run chia stop all -d and then delete your config folder and then restart chia and repopulate your plot folders.

I did this and now the problem with the plots not being detected in the GUI and the infinitely loading farming data is gone. However I can't say that it works properly now because when I removed the mainnet\config folder (I copied it to another location for safe keeping just in case...) which had the config.yaml file I also removed the folder inside named ssl (which contained the folders ca, daemon, farmer, full_node, harvester, introducer, timelord and wallet). The result is that now, (after restarting chia) I have to wait for the full node to get copied back up which will take about 5 days from my experience...

emlowe commented 1 year ago

If you didn't move the files in ~/.chia/mainnet/db then your node shouldn't have to do a complete resync.

The problem was your config had been setup as a remote harvester, so the harvester section in the config.yaml was pointing to a farmer that was on some other host. So the local farmer had no harvesters connected to it, as the harvester was trying to connect to some other farmer. This case is apparently not handled well somewhere.

By regenerating the config, you have reset the harvester to connect to the local farmer (which is the default configuration).

justnatural commented 1 year ago

f you didn't move the files in ~/.chia/mainnet/db then your node shouldn't have to do a complete resync.

I did not do that, yes still it wanted to do a complete resync... It took 5 days to get back to peak height but I guess it's better late than never...

By regenerating the config, you have reset the harvester to connect to the local farmer (which is the default configuration)

Thank you all for the support and explanations! My issue is fixed after following @MumfMeisterT advice.

emlowe commented 8 months ago

closing