Chia-Network / chia-blockchain

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

[Bug] chia plotnft get_login_link generates wrong URL when farming to multiple pools #17768

Open whosrdaddy opened 7 months ago

whosrdaddy commented 7 months ago

What happened?

I farm currently to 2 different pools, first wallet ID is connected to spacepool , second wallet ID is connected to spacefarmers . When I execute chia plotnft get_login_link -l I get the correct link for spacefarmers, when I do the same for the first wallet (spacepool) I get an url for spacefarmers, not spacepool, it seems like it always generates the URL for the highest wallet ID, which is in my case spacefarmers. My workaround is to correct the wrongly generated url with the correct url but this is a bit annoying. Second problem is that the link is not correct (observe the second / after https://xch.spacefarmers.io/

Version

2.1.4

What platform are you using?

Linux

What ui mode are you using?

CLI

Relevant log output

pc:~$ chia plotnft show
Wallet height: 5114136
Sync status: Synced
Wallet ID: 2
Current state: FARMING_TO_POOL
Current state from block height: 543474
Launcher ID: ...
Target address (not for plotting): ...
Number of plots: ...
Owner public key: ...
Pool contract address (use ONLY for plotting - do not send money to this address): ...
Current pool URL: https://eu1.pool.space
etc...

Wallet ID: 3
Current state: FARMING_TO_POOL
Current state from block height: 3526817
Launcher ID: ...
Target address (not for plotting): ...
Number of plots: ...
Owner public key: ...
Pool contract address (use ONLY for plotting - do not send money to this address): ...
Current pool URL: https://xch.spacefarmers.io/
etc...

pc:~$ chia plotnft get_login_link -l <launcher ID of wallet ID 2 (spacepool)>
https://xch.spacefarmers.io//login?launcher_id=<redacted>&authentication_token=...
^^
Incorrect, should be https://eu1.pool.space/...
pc:~$ chia plotnft get_login_link -l <launcher ID of wallet ID 3 (spacefarmers)>
https://xch.spacefarmers.io//login?launcher_id=<redacted>&authentication_token=...
wjblanke commented 7 months ago

Hey adam, must be here somewhere. Not sure why the URL is not being correctly assigned.

https://github.com/Chia-Network/chia-blockchain/blame/main/chia/farmer/farmer.py#L722

arvidn commented 6 months ago

@whosrdaddy in your config.yml there should be a section pool: and it should contain a section called pool_list:.

In your case, I would expect this list to have two items, each representing a pool. Each pool has a few fields, such as:

Do your pools appear to have the correct pool_url value associated with them?

wjblanke commented 6 months ago

Could you save a copy of your current config.yaml, and then delete it and resync your wallet? That will repopulate config.yaml and we can see if the old one was somehow corrupted/different.

BrandtH22 commented 6 months ago

Hey @aqk take note that with the new config you might need to repopulate a few other things also:

Toebbe commented 5 months ago

If got the same problem with exactly the same pools. Deleting the config, repopulate and forced wallet sync doesn't help. I'm using three or more windows machines to plot or farm or just be an backup and the pool url is changed not everytime on all machines to the same wrong pool url. On one machine all pools are changed to space on the other to spacefarmers. It depends on the pool, which is in the config.yaml the last pool in the list, i think.

Edith: No it does not depend on the last pool in the list. version chia 2.3.1

wjblanke commented 3 months ago

Toebbe: URL issues that are 2.3.0+ are likely caused by a regression we are fixing for 2.4.3. This has to do with multiple plotnfts that belong to the same key. The URLs are being blanket updated.

BUT the original issue was with 2.1.4 which would not have been affected by this regression. So it sounds like there is still an underlying issue here. Unfortunately its been masked by a later regression in the same code base. We are still looking for the OP's issue.

Toebbe commented 3 months ago

thanks for the news, wjblanke

Ok, I'll wait for the next version and will test again.

have a nice day

wjblanke commented 3 months ago

We should have a 2.4.3 rc 1 out soon with a fix for your issue Toebbe. It may fix the original OP issue but that predates Toebbe's regression.