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] errors when trying to switch a PlotNFT from one self pooling to pool #10356

Closed esaung closed 2 years ago

esaung commented 2 years ago

What happened?

with an existing PlotNFT set up for self pooling, JM tried to switch the PlotNFT from selfpooling to joining a pool.

when trying with 0 mojo fee, 1 mojo fee, 10 mojo fee, and 100 mojo fee, it all fails with the following error code paste

it did seem to work via the CLI for JM-

PS C:\Users\jm\AppData\Local\chia-blockchain\app-1.2.12333\resources\app.asar.unpacked\daemon> .\chia.exe plotnft join -u https://na1.pool.space -i 8 {'authentication_token_timeout': 5, 'description': 'Welcome to Space Pool. By creating this Plot NFT, you agree ' 'to the following terms https://pool.space/terms', 'fee': 0.01, 'logo_url': 'https://pool.space/logo-250.png', 'minimum_difficulty': 1, 'name': 'Space Pool', 'protocol_version': 1, 'relative_lock_height': 64, 'target_puzzle_hash': '0x2f2c9ba1b2315d413a92b5f034fa03282ccba1767fd9ae7b14d942b969ed5d57'}

Will join pool: https://na1.pool.space with Plot NFT 2388833433. Confirm [n]/y: y Transaction submitted to nodes: [('f89770c3e3e6dec4b3d65599a9a4456d6fe030512443443d5656565dfed8ce8d', 3, 'NO_TRANSACTIONS_WHILE_SYNCING')] Do chia wallet get_transaction -f 2388833433 -tx 0x45b65570a6ed982dada31db922d1b1fca79d7a0993cfaa489c6b75604cfaeed1 to get status

Version

1.2.12 dev 333

What platform are you using?

Windows

What ui mode are you using?

GUI

Relevant log output

No response

jmhands commented 2 years ago

confirmed still exists from GUI in 333. Created a new plotnft and now correctly goes to walletid 2. From GUI try to change pool with 5 mojo fee, and get following error.

Error Request 11b95efbd3d7b56184779cf3bc39f4d2950552c98a8b63726e193dbc936de10f failed: {"error":"","success":false}

debug.log

seeden commented 2 years ago

Fixed via https://github.com/Chia-Network/chia-blockchain-gui/commit/139a1df19352b68bf3b223e2450c104680cfc698

jmhands commented 2 years ago

I have tried again on version 1.2.12390 and getting the following error Error: Cannot join pool due to unconfirmed transaction. If this is stuck, delete the unconfirmed transaction.

seeden commented 2 years ago

Can you try to delete the unconfirmed transaction from "..." menu and try it again?

jmhands commented 2 years ago

I tried that as well as a restart after delete unconfirmed transactions, same error

jmhands commented 2 years ago

nuking the wallet db and tested again, and it appears to be working!

esaung commented 2 years ago

did you have any offers (not transactions) that were stuck in pending (like the 300 XCH for 14USDS)? we want wallet db nuking to be last option to get out of the situation.

jmhands commented 2 years ago

I did not, but this wallet had been upgraded from beta 1.2.12333 > 1.2.12390

jmhands commented 2 years ago

Wallet height: 1644430
Sync status: Synced
Wallet id 2:
Current state: INVALID_STATE. Please leave/join again after block height 1639928
Current state from block height: 1639864
Launcher ID: 1220939680c7fbef1fcd7f692ae9742d0606df01484f50182063f1729f7d962c
Target address (not for plotting): xch19ukfhgdjx9w5zw5jkhcrf7sr9qkvhgtk0lv6u7c5m9ptj60dt4tscqkmna
Number of plots: 0
Owner public key: a0c607e0d8b314d7c1f1ebcb85a03770aae40d1d4174c559c317212d837391c614b448dd49beb9c00b6d6ae95e30a9c1
Pool contract address (use ONLY for plotting - do not send money to this address): xch1uf48n3f50xrs7zds0uek9wp9wmyza6crnex6rw8kwm3jnm39y82q5mvps6

PS C:\Users\jm\AppData\Local\chia-blockchain\app-1.2.12398\resources\app.asar.unpacked\daemon> .\chia.exe plotnft leave -i 2
Will start self-farming with Plot NFT on wallet id 2 fingerprint 2388833433.
Confirm [n]/y: y
Error performing operation on Plot NFT -f 2388833433 wallet id: 2: {'error': "'WalletStateManager' object has no attribute 'get_peak'", 'success': False}
PS C:\Users\jm\AppData\Local\chia-blockchain\app-1.2.12398\resources\app.asar.unpacked\daemon>```
jmhands commented 2 years ago

somehow got my system in a weird state, where I changed pools on another machine and now this one won't let me join or leave the plotnft. Blew out config and wallet db and rebuilt from scratch, 1.2.12.dev398

mariano54 commented 2 years ago

There are bugs here. This addresses at least one of them: https://github.com/Chia-Network/chia-blockchain/pull/10545/files

mariano54 commented 2 years ago

Should be fixed now. by https://github.com/Chia-Network/chia-blockchain/pull/10545