-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Showing incorrect balance when adding public key [Bug] #18234
Comments
Public keys only support unhardened addresses so if you have an older wallet that uses some hardened addresses those coins won't show up. You can resend your balance from a private key wallet to a new address (unhardened by default) and the balance should show up in all wallets, private or public. Let us know how it goes. |
OK, thanks! I was using ozone to make a new wallet and used that public key. The chia wallet reference wallet reflected the same balance on the wallet with public keys as the wallet with private keys. Later I added the public key of the ozone wallet to the chia reference wallet that had a new private key. Then I used an address derived from the wallet with the public key to send xch from my ozone wallet. The balance was correct after a successful transfer. |
Actually, I thought the wallet updated properly when sending to a new address. However, the send address given when displaying the public key did not provide the correct receive address. |
Can u send a screenshot. The GUI shows the current unused address. Wallets have many, many addresses for privacy reasons. |
Everything looks good here. Are you having any issues anymore? Thanks |
I was having this issue on 2.4.1; just updated to 2.4.2, still there. |
I am also still having issues |
I downloaded the chia version 2.4.2 and it is the same issue. Now the private key and public key have different receive addresses. However, the balances in both wallets remain the same and the receive address provided by the observer wallet is signable by the private wallet. |
The addresses can be different even though the key is the same (public versus private). It depends on how chia chooses which addresses are free given the state that the current machine knows about. But all those addresses should be usable by either machine given there are unhardened (observer) addresses. Since the balances are the same it seems like things are fine. Are you having issues using the addresses from either machine? They should all work. Thinking this is not a bug but will leave open for now for comments and thanks for your concern and report! |
No, the balances should not be the same because the public key is derived from a different private than the actual private key in the wallet. Additionally, the receive address from the public (observer) wallet should not be signable by the wallet with the private key if it the observer wallet is derived from a different private key. |
+1. The UI is absolutely picking up the wrong key on the Select Key screen. This is 4 separate mnemonics: Green is observable w/ private key, Red is non-observable(?) (very old) w/ private key, Blues are two observable mnemonics with only public key. |
Also, while "logged in" to Blue 2024, I was able to send Green Farmer's tokens. |
OK we see now, so there is some kind of aliasing going on between different "keys" when you are using the observer feature for any of them. We will look into this. Thanks for the additional screenshots and determined responses. |
Thanks! |
Hey @jeherschberger or @sadiesue43 can you look in your logs for any errors? I'm particularly suspecting |
I believe I have the fix please feel free to install from source and try it out. Also worth noting that if you remove the non-observer keys from your keychain then everything should work fine (in the meantime) |
Awesome! I won't be able to test this until tomorrow, but will let you know. |
I just tried to install the chia wallet GUI from source and I got this error. 2024-07-25T20:20:28.876 wallet wallet_server : WARNING API not ready, ignore request: {'data': 'some long hexcode', I replaced the actual hexcode with text for privacy reasons. |
I also deleted the wallet db and rename the .chia_keys folder. Then I added the public key of wallet 1 and it worked. However when I added the wallet 2 by private keys it gave this error. wallet chia.wallet.wallet_state_manager: ERROR Failed to add coin_state: CoinState { coin: Coin { parent_coin_info: 0eeededcc9c10924a8ebd07902aa4e5e8b69a1681c33c91d9284fcbbc45addf8, puzzle_hash: de7bf599a1b7e217b5ed301c8c8ceb8e255ea50a56aa542232672a42370799dc, amount: 1 }, spent_height: None, created_height: Some(5151458) }, error: 2 |
Ok, it is working after I ran "chia stop -d all". |
I've tested this and it appears to be working now. Yay! |
Great! Thanks for the information guys |
What happened?
I added a public key to the new reference wallet 2.4.0, but the balance is similar to a wallet with private keys on the same computer. I added a public key from a 2 year wallet and a newly created wallet. Both showed the same wallet as the local wallet. I also obtained the same result in both the GUI and the CLI.
Version
2.4.0
What platform are you using?
Linux
What ui mode are you using?
GUI
Relevant log output
No response
The text was updated successfully, but these errors were encountered: