chia-blockchain: DID wallet disappeared / stopped working

What happened?

I created a DID for my NFT collection on my farmer. I assigned that DID to a new NFT wallet I wanted to use for minting. Minting started just fine, but after a while my minting script stopped. Since I wasn’t able to access my farmer for a while I wanted to move my minting operations to a new node. But on that new node my DID wallet never showed up, even though I used the same key as on my farmer. The NFT wallet did show up and had the correct DID assigned to it, but if I try to continue minting with it, it says the assigned DID’s wallet could not be found.

I did some research and found a thread in the Chia forum, where someone had a similar problem and solved it by copying the original wallet db that has been used to create the DID to the new machine. I tried that as well and that actually made the wallet show up in my wallet list.

But since then the DID wallet has a balance of zero while my other DID wallets all have a balance of 1.0. I guess that means the DID smart coin isn’t even really there, right? Minting also doesn’t work anymore. Trying to continue minting my collection gives me the attached warning and error. So, it seems like the DID wallet only exists in that original wallet db which was in use when I created the DID. Even if I delete the wallet db on my farmer and sync it again without accepting unknown peers, the DID wallet doesn’t show up.

The DID is did:chia:12e7kac8e2grp82t2p765y2wuqlzq505jtcafmddj6qx3sp2n4p0qx449ze if that helps.

I already tried everything I found on the web several times. Waiting, raising the derivation index, restarting the client, deleting and rebuilding the databases, creating a new DID, creating a POOL NFT and deleting unconfirmed transactions.

Version

1.6.0

What platform are you using?

Linux

What ui mode are you using?

CLI

Relevant log output

2022-10-22T21:23:33.600 wallet chia.wallet.did_wallet.did_wallet: WARNING  Can't select 1, from spendable 0 for wallet id 38
2022-10-22T21:23:33.612 wallet chia.rpc.util              : WARNING  Error while handling message: Traceback (most recent call last):
  File "/home/pi/chia-blockchain/chia/rpc/util.py", line 16, in inner
    res_object = await f(request_data)
  File "/home/pi/chia-blockchain/chia/rpc/wallet_rpc_api.py", line 1549, in nft_mint_nft
    spend_bundle = await nft_wallet.generate_new_nft(
  File "/home/pi/chia-blockchain/chia/wallet/nft_wallet/nft_wallet.py", line 384, in generate_new_nft
    did_inner_hash, did_bundle = await self.get_did_approval_info(launcher_coin.name())
  File "/home/pi/chia-blockchain/chia/wallet/nft_wallet/nft_wallet.py", line 292, in get_did_approval_info
    did_bundle = await wallet.create_message_spend(puzzle_announcements=[nft_id])
  File "/home/pi/chia-blockchain/chia/wallet/did_wallet/did_wallet.py", line 703, in create_message_spend
    assert coins is not None
AssertionError

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 43 (15 by maintainers)

Most upvoted comments

User is still missing DIDs and opened a new ticket for this issue. ( #15079 ) I closed as duplicate and reopened this issue. @ytx1991 Can you please readdress with @codephunk?

It’s merged into the main, not sure if it is built in 1.8.

Are those machines share the same public IP? I suggest you just open the wallet on one machine and then try things again. The latest change of did_find_lost_did should cover your case. But you need to ensure the derivation index of your wallet is big enough and there is no gap.

No, it’s in your chia config.yaml file

The guy in #13765 verified it should work, though he has to run that find_lost_did command many times. I think there are 2 possible root cause:

  1. Your DID does not belong to the wallet you are using. It may transfer to another wallet unintentionally. To verify this, you can run: chia rpc wallet did_get_info '{"coin_id":"YOUR_DID_ID"}' You should see the P2_Address in the response. Then you can check if it is your address (Send 1 mojo or some other way)
  2. Your DID does belong to this wallet but the derived address is not added to your database. You can increase the derivation index to a bigger number to increase the address is generated in your database. Then resync the wallet database.

I fixed some bugs. Please pull and reinstall then try it again.

I decided to solve this issue in another way. You can try this.

  1. Pull did_recreate then run ./install.sh. No need for resync this time.
  2. log in to the wallet which owns the DID and wait for it fully synced.
  3. Run this command in Chia CLI tool:
For Linux/Mac
chia rpc wallet did_find_lost_did '{"coin_id":"did:chia:12e7kac8e2grp82t2p765y2wuqlzq505jtcafmddj6qx3sp2n4p0qx449ze"}'
For Windows
chia rpc wallet did_find_lost_did "{\"coin_id\":\"did:chia:12e7kac8e2grp82t2p765y2wuqlzq505jtcafmddj6qx3sp2n4p0qx449ze\"}"

It may take some time depending on you spent DID how many times. You should see a response with “success”: true. Your recovery info will be invalid, so you need to update your DID recovery list again. Check RPC API doc for more details.

Thanks, for your details. I just updated the did_recreate to cover this case. Please pull and resync again.

For some reason, the fix was not built into the 1.6.1. You can try the did_empty branch to see if it can recover your DID.