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

DID wallet disappeared / stopped working #13691

Closed codephunk closed 1 year ago

codephunk commented 1 year ago

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
ytx1991 commented 1 year ago

We are aware of this bug and pending release the fix in the 1.6.1. In fact, you still own your DID but the wallet doesn't acknowledge it because of the bug. Unfortunately, so far, you need to do the minting on the host where you created the DID. Or transfer it to a new wallet (different private key).

codephunk commented 1 year ago

Thank you! Minting currently also doesn't work on the host where I created the DID. It shows the wallet but with a balance of zero. Or did you mean that I still have to mint on the host where I created the DID after I updated to 1.6.1?

codephunk commented 1 year ago

Could you please give me an update regarding my last question? I tried 1.6.1 on a node (not where I originally created the DID though) and currently my DID is still not showing up. Any other ideas what I could try?

ytx1991 commented 1 year ago

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.

codephunk commented 1 year ago

Thanks. But git tells me that there is no remote branch called "did_empty". Sure that this is its name? fatal: couldn't find remote ref did_empty

codephunk commented 1 year ago

Found it. But I also think that this issue here comes very close to the problem I have: https://github.com/Chia-Network/chia-blockchain/issues/13765

So I'll try the did_recreate branch first and see if that brings my DID back.

codephunk commented 1 year ago

The DID didn't show up after a db resync on did_recreate. But I've found some errors in the log. I could also send you the full resync log if that would help.

The "Unexpected return from PoolWallet" shows up several times, so it might just be a coincidence that its right above both of these errors.

2022-11-16T07:51:47.283 wallet chia.pools.pool_puzzles    : ERROR    Unexpected return from PoolWallet Smart Contract code cannot unpack non-iterable int object
2022-11-16T07:51:47.425 wallet chia.wallet.wallet_state_manager: INFO     parent: b'\x82e\xbc\x90Q\xae\xae\xa2\xfb\x03_u\xaei\xf7\xec\xaa:e\xf0\xab\xa1\x9c\x1a0(H\x91<\xc1\xf8e' inner_puzzle_hash for parent is d380bd8a1c3b6a226acdae8b9821452e3b76f603289e50f1dc0c0cf4f20eebb8
2022-11-16T07:51:47.441 wallet chia.wallet.wallet_state_manager: INFO     Found DID, launch_id 26f3751ef75bd7565c647bf2f0646f02f45bda5c525b943b0727a7ffe298dd93.
2022-11-16T07:51:47.470 wallet DID did:chia:1ymeh28hht0t4vhry00e0qer0qt69hkju2fdegwc8y7nllc5cmkfsmlkj6v: INFO     Creating DID wallet from a coin spend Coin { parent_coin_info: 2853a0442784ad4c37fb7dbaa417f13921f2c7272017d4b40e7892e22c1f03af, puzzle_hash: eff07522495060c066f66f32acc2a77e3a3e737aca8baea4d1a64ea4cdc13da9, amount: 1 }  ...
2022-11-16T07:51:47.480 wallet chia.wallet.wallet_state_manager: ERROR    Error adding state... rest of non-cons
Traceback (most recent call last):
  File "/home/pi/chia-blockchain/chia/wallet/wallet_state_manager.py", line 1041, in new_coin_state
    wallet_id, wallet_type = await self.determine_coin_type(peer, coin_state, fork_height)
  File "/home/pi/chia-blockchain/chia/wallet/wallet_state_manager.py", line 648, in determine_coin_type
    return await self.handle_did(did_curried_args, parent_coin_state, coin_state, coin_spend, peer)
  File "/home/pi/chia-blockchain/chia/wallet/wallet_state_manager.py", line 842, in handle_did
    did_wallet = await DIDWallet.create_new_did_wallet_from_coin_spend(
  File "/home/pi/chia-blockchain/chia/wallet/did_wallet/did_wallet.py", line 204, in create_new_did_wallet_from_coin_spend
    for did in inner_solution.rest().rest().rest().rest().rest().as_python():
  File "/home/pi/chia-blockchain/venv/lib/python3.9/site-packages/clvm/SExp.py", line 199, in rest
    raise EvalError("rest of non-cons", self)
clvm.EvalError.EvalError: rest of non-cons

And here is the same error for the DID did:chia:12e7kac8e2grp82t2p765y2wuqlzq505jtcafmddj6qx3sp2n4p0qx449ze - the one I can't access anymore.

2022-11-16T07:52:04.990 wallet chia.pools.pool_puzzles    : ERROR    Unexpected return from PoolWallet Smart Contract code cannot unpack non-iterable int object
2022-11-16T07:52:05.197 wallet chia.wallet.wallet_state_manager: INFO     parent: b"\xc7\xc6l)d\xbdT#\xa4]\xfd|\xcb)\xb9\xe4\r\xfa'\xc3\x1a\xdf\x1a\xfb\xcf\x0cy\xa1\xf8\xec\x82\xb0" inner_puzzle_hash for parent is 9d96813457b5c9477e50eff20eba33c817df5e7f4309f3d2cba4596c8e0b25f2
2022-11-16T07:52:05.213 wallet chia.wallet.wallet_state_manager: INFO     Found DID, launch_id 567d6ee0f9520613a96a0fb54229dc07c40a3e925e3a9db5b2d00d180553a85e.
2022-11-16T07:52:05.242 wallet DID did:chia:12e7kac8e2grp82t2p765y2wuqlzq505jtcafmddj6qx3sp2n4p0qx449ze: INFO     Creating DID wallet from a coin spend Coin { parent_coin_info: a0b57c3cfa8eec88da9169d57b8f353c3dc7fd317f1f40ce303208bad3e0c7e5, puzzle_hash: eff07522495060c066f66f32acc2a77e3a3e737aca8baea4d1a64ea4cdc13da9, amount: 1 }  ...
2022-11-16T07:52:05.252 wallet chia.wallet.wallet_state_manager: ERROR    Error adding state... rest of non-cons
Traceback (most recent call last):
  File "/home/pi/chia-blockchain/chia/wallet/wallet_state_manager.py", line 1041, in new_coin_state
    wallet_id, wallet_type = await self.determine_coin_type(peer, coin_state, fork_height)
  File "/home/pi/chia-blockchain/chia/wallet/wallet_state_manager.py", line 648, in determine_coin_type
    return await self.handle_did(did_curried_args, parent_coin_state, coin_state, coin_spend, peer)
  File "/home/pi/chia-blockchain/chia/wallet/wallet_state_manager.py", line 842, in handle_did
    did_wallet = await DIDWallet.create_new_did_wallet_from_coin_spend(
  File "/home/pi/chia-blockchain/chia/wallet/did_wallet/did_wallet.py", line 204, in create_new_did_wallet_from_coin_spend
    for did in inner_solution.rest().rest().rest().rest().rest().as_python():
  File "/home/pi/chia-blockchain/venv/lib/python3.9/site-packages/clvm/SExp.py", line 199, in rest
    raise EvalError("rest of non-cons", self)
clvm.EvalError.EvalError: rest of non-cons

Some more errors that didn't seem to be directly related to my issue at first sight. I've added them for completeness.

2022-11-16T07:52:54.467 wallet NFT Wallet                 : INFO     NFT wallet NFT Wallet has been notified that Coin { parent_coin_info: 640590ebacb21cadc4214abb227d55607e96488ca13259c403056fbabd909ddc, puzzle_hash: c1674d0eec988b24f84b0b776f0b0c6980c54ecb8faf17f4bb2561d6550b63cf, amount: 1 } was added
2022-11-16T07:52:54.703 wallet NFT Wallet                 : INFO     Adding a new NFT to wallet: Coin { parent_coin_info: 640590ebacb21cadc4214abb227d55607e96488ca13259c403056fbabd909ddc, puzzle_hash: c1674d0eec988b24f84b0b776f0b0c6980c54ecb8faf17f4bb2561d6550b63cf, amount: 1 }
2022-11-16T07:52:54.860 wallet chia.wallet.wallet_state_manager: INFO     Removing old NFT, NFT_ID:37e2fcf113015faa478d0cb0da78a11e8be7e5629705b495ef1e116c5c9a68bc, DID_ID:None
2022-11-16T07:52:54.872 wallet NFT Wallet                 : INFO     Tried removing NFT coin that doesn't exist: b'y\xad\x85\xbdjn\xb9\x80\x89\xc4\xd9i\xc7\xd6)Z\xc1\x83\x14\x0ci~\xb1\xf17k\xd7e\x03\xe2\xc33'
2022-11-16T07:52:54.902 wallet chia.wallet.wallet_state_manager: INFO     Adding new NFT, NFT_ID:37e2fcf113015faa478d0cb0da78a11e8be7e5629705b495ef1e116c5c9a68bc, DID_ID:b'V}n\xe0\xf9R\x06\x13\xa9j\x0f\xb5B)\xdc\x07\xc4\n>\x92^:\x9d\xb5\xb2\xd0\r\x18\x05S\xa8^'
2022-11-16T07:52:54.924 wallet NFT Wallet                 : INFO     NFT wallet NFT Wallet has been notified that Coin { parent_coin_info: 79ad85bd6a6eb98089c4d969c7d6295ac183140c697eb1f1376bd76503e2c333, puzzle_hash: 5948c92d83913a4fea1f88d291f67059a849fb80af08146732df7f3f50d0f4be, amount: 1 } was added
2022-11-16T07:52:55.059 wallet chia.rpc.util              : WARNING  Error while handling message: Traceback (most recent call last):
  File "/home/pi/chia-blockchain/chia/rpc/util.py", line 18, in inner
    res_object = await f(request_data)
  File "/home/pi/chia-blockchain/chia/rpc/wallet_rpc_api.py", line 884, in get_next_address
    raise ValueError(f"Wallet type {wallet.type()} cannot create puzzle hashes")
ValueError: Wallet type 10 cannot create puzzle hashes

This had "deleting wallet" in it ;)

2022-11-16T07:52:08.059 wallet chia.wallet.wallet_state_manager: INFO No NFT, deleting wallet 567d6ee0f9520613a96a0fb54229dc07c40a3e925e3a9db5b2d00d180553a85e ...

I also got a ton of those message:

2022-11-16T07:52:05.935 wallet chia.wallet.wallet_state_manager: INFO Cannot find a NFT wallet for NFT_ID: b'%\xd6\x915\xe1\xe53\x91\xc5\xa8\t\x9a\xb8\xa6S\xd3AQ\xec\x9e\x89N\xf4e<\x8e\xd7\x91\xb4\xb3x\xa1' DID_ID: b'V}n\xe0\xf9R\x06\x13\xa9j\x0f\xb5B)\xdc\x07\xc4\n>\x92^:\x9d\xb5\xb2\xd0\r\x18\x05S\xa8^', creating a new one.

2022-11-16T07:52:05.459 wallet chia.wallet.wallet_state_manager: INFO     Removing old NFT, NFT_ID:eff5081633a3078c9fb6dcb20881867f729ad65f927dfd74c65ca823c0b006d7, DID_ID:None
2022-11-16T07:52:05.461 wallet NFT Wallet                 : INFO     Tried removing NFT coin that doesn't exist: b'\xaf<)\xf3\xfa-\x80_>-:\xb8\x97i\xa7\x90m\xde\xe7\xda\xd1\x81+h\xc8\x935\xccN\xce(\xff'
2022-11-16T07:52:05.487 wallet chia.wallet.wallet_state_manager: INFO     Adding new NFT, NFT_ID:eff5081633a3078c9fb6dcb20881867f729ad65f927dfd74c65ca823c0b006d7, DID_ID:b"&\xf3u\x1e\xf7[\xd7V\\d{\xf2\xf0do\x02\xf4[\xda\\R[\x94;\x07'\xa7\xff\xe2\x98\xdd\x93"
2022-11-16T07:52:05.503 wallet NFT Wallet                 : INFO     Tried removing NFT coin that doesn't exist: b'\r\x02\xd0\xb9\xe1\x16\xb7\x11\xa3dh\x9b#\xcdZ\xde@\xbe&\xad\xbf\xac\xa4r\xc8\xfaD\xbc_\xebC\xae'
2022-11-16T07:52:56.440 wallet chia.wallet.wallet_state_manager: INFO     Removing old NFT, NFT_ID:9e232b06341a0ba4e3907f197b0472fe7538f82656cdb778e2c5ef788c114fbe, DID_ID:None
2022-11-16T07:52:56.442 wallet NFT Wallet                 : INFO     Tried removing NFT coin that doesn't exist: b'\xca2$_i\n\x90\xe2\x96\xdc\x9d\x0ek\xbe!\x03q\x96\xafX=Mz\x071s\x12#\xfd\xcb\x91@'
2022-11-16T07:52:56.470 wallet chia.wallet.wallet_state_manager: INFO     Adding new NFT, NFT_ID:9e232b06341a0ba4e3907f197b0472fe7538f82656cdb778e2c5ef788c114fbe, DID_ID:b'V}n\xe0\xf9R\x06\x13\xa9j\x0f\xb5B)\xdc\x07\xc4\n>\x92^:\x9d\xb5\xb2\xd0\r\x18\x05S\xa8^'
2022-11-16T07:52:56.511 wallet NFT Wallet                 : INFO     NFT wallet NFT Wallet has been notified that Coin { parent_coin_info: ca32245f690a90e296dc9d0e6bbe21037196af583d4d7a0731731223fdcb9140, puzzle_hash: 3045c19636cdfe61196d920e824721ebb5170e368fadd7b66396e2ea22c87163, amount: 1 } was added
2022-11-16T07:52:56.640 wallet chia.rpc.util              : WARNING  Error while handling message: Traceback (most recent call last):
  File "/home/pi/chia-blockchain/chia/rpc/util.py", line 18, in inner
    res_object = await f(request_data)
  File "/home/pi/chia-blockchain/chia/rpc/wallet_rpc_api.py", line 884, in get_next_address
    raise ValueError(f"Wallet type {wallet.type()} cannot create puzzle hashes")
ValueError: Wallet type 10 cannot create puzzle hashes

2022-11-16T07:52:56.727 wallet NFT Wallet                 : INFO     Adding a new NFT to wallet: Coin { parent_coin_info: ca32245f690a90e296dc9d0e6bbe21037196af583d4d7a0731731223fdcb9140, puzzle_hash: 3045c19636cdfe61196d920e824721ebb5170e368fadd7b66396e2ea22c87163, amount: 1 }
2022-11-16T07:52:56.890 wallet chia.rpc.util              : WARNING  Error while handling message: Traceback (most recent call last):
  File "/home/pi/chia-blockchain/chia/rpc/util.py", line 18, in inner
    res_object = await f(request_data)
  File "/home/pi/chia-blockchain/chia/rpc/wallet_rpc_api.py", line 884, in get_next_address
    raise ValueError(f"Wallet type {wallet.type()} cannot create puzzle hashes")
ValueError: Wallet type 8 cannot create puzzle hashes
ytx1991 commented 1 year ago

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

codephunk commented 1 year ago

Thanks! Looks promising so far.

2022-11-17T09:31:37.942 wallet chia.wallet.wallet_state_manager: INFO     Found DID, launch_id 567d6ee0f9520613a96a0fb54229dc07c40a3e925e3a9db5b2d00d180553a85e.
2022-11-17T09:31:37.972 wallet DID did:chia:12e7kac8e2grp82t2p765y2wuqlzq505jtcafmddj6qx3sp2n4p0qx449ze: INFO     Creating DID wallet from a coin spend Coin { parent_coin_info: a0b57c3cfa8eec88da9169d57b8f353c3dc7fd317f1f40ce303208bad3e0c7e5, puzzle_hash: eff07522495060c066f66f32acc2a77e3a3e737aca8baea4d1a64ea4cdc13da9, amount: 1 }  ...
2022-11-17T09:31:37.980 wallet DID did:chia:12e7kac8e2grp82t2p765y2wuqlzq505jtcafmddj6qx3sp2n4p0qx449ze: WARNING  DID 567d6ee0f9520613a96a0fb54229dc07c40a3e925e3a9db5b2d00d180553a85e has a recovery list hash but missing a reveal, you may need to reset the recovery info.
codephunk commented 1 year ago

Ok, definitely one step further here, since the wallet is showing up again. That only happened before when I was using the old wallet db.

But the balance is still zero.

DID did:chia:12e7kac8e2grp82t2p765y2wuqlzq505jtcafmddj6qx3sp2n4p0qx449ze:
   -Total Balance:         0.0
   -Pending Total Balance: 0.0
   -Spendable:             0.0
   -Type:                  DECENTRALIZED_ID
   -DID ID:                did:chia:12e7kac8e2grp82t2p765y2wuqlzq505jtcafmddj6qx3sp2n4p0qx449ze
   -Wallet ID:             43

And chia wallet did get_did -i 43 gives me a Failed to get DID: 'coin_id' error.

ytx1991 commented 1 year ago

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.

codephunk commented 1 year ago

The first try gave me this error: Request failed: {'error': 'This DID 567d6ee0f9520613a96a0fb54229dc07c40a3e925e3a9db5b2d00d180553a85e is not belong to the connected wallet', 'success': False}

The second try this one: Request failed: {'error': 'Coin record 0x567d6ee0f9520613a96a0fb54229dc07c40a3e925e3a9db5b2d00d180553a85e not found', 'success': False}

ytx1991 commented 1 year ago

Did you connect to the right wallet?

ytx1991 commented 1 year ago

You can use 275d0e2ccccbd793834ff84885eae6d8197ddcf5e50e8a7f8c7f6bc30a55a15c for "coin_id" instead of your DID ID. It should be much faster.

ytx1991 commented 1 year ago

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

codephunk commented 1 year ago

Still the same error: Request failed: {'error': 'This DID 567d6ee0f9520613a96a0fb54229dc07c40a3e925e3a9db5b2d00d180553a85e is not belong to the connected wallet', 'success': False}

Did you connect to the right wallet?

I have only one key installed on the node where I'm trying this.

ytx1991 commented 1 year ago

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.
codephunk commented 1 year ago

Ok, I'll check out both options. Thank you!

codephunk commented 1 year ago

One question though - isn't the derivation index resetting when I delete the wallet db?

ytx1991 commented 1 year ago

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

codephunk commented 1 year ago

Thank you so much for your ongoing support!

I found the address that has the DID - it's xch1nktgzdzhkhy5wljsaleqaw3neqta7hnlgvyl85kt53vkerstyheq8eaavr. I've send a few Mojos, but they didn't get back to my wallet, so it must belong to another one. I seriously got no idea how that could happen. I have never sent a DID anywhere - at least not knowingly. But I also don't know during which process I could have sent it accidentally.

Is there any way I can find out where that address belongs to? Or at least when the DID was sent?

codephunk commented 1 year ago

What a rollercoaster :D From devastated to hopeful again.

I found out that the address indeed belongs to my wallet using chia keys derive search -P -l1000 xch1nktgzdzhkhy5wljsaleqaw3neqta7hnlgvyl85kt53vkerstyheq8eaavr.

Searching keys derived from: 518133150
m/12381/8444/2/351
Found wallet address: xch1nktgzdzhkhy5wljsaleqaw3neqta7hnlgvyl85kt53vkerstyheq8eaavr (HD path: m/12381/8444/2/351)

Search completed in 9.516142451000633 seconds

So, I guess I'll have to set a higher derivation index. I had set it to over 4000 in the past but it seems that wasn't enough.

But what is the name of the config setting for the derivation index? Setting it on CLI seems to be only temporary and resets when I delete the db. I also didn't find any setting that could match in the default config at https://github.com/Chia-Network/chia-blockchain/blob/main/chia/util/initial-config.yaml No derivation_index or something like that.

codephunk commented 1 year ago

Just tried it again to be sure. Updated the derivation index to 10000, deleted the wallet db and started the wallet. Result: Last derivation index: 424

ytx1991 commented 1 year ago

You can search in your wallet DB for that address puzzle hash. As long as it is in the derivation_paths table you can use did_find_lost_did API to find the coin. According to m/12381/8444/2/351, it seems the 351ish of your address. It should be there.

ytx1991 commented 1 year ago

Is your issue solved?

codephunk commented 1 year ago

Yes, it's finally back! Thank you so much and a happy new year! :)

codephunk commented 1 year ago

Is your issue solved?

No, sorry - I was using the GUI and saw the profile with that DID in there but the wallet still has a balance of zero. Can you please elaborate how I can find the address puzzle hash in the db? I see the derivation_paths table but how do I find the correct puzzle hash in there?

codephunk commented 1 year ago

@ytx1991 can you help me with this?

codephunk commented 1 year ago

After installing the latest did_find update, I get a new error when I run did_find_lost_did:

Request failed: {'error': 'Cannot recover DID 567d6ee0f9520613a96a0fb54229dc07c40a3e925e3a9db5b2d00d180553a85e because the last spend is metadata update.', 'success': False}

ytx1991 commented 1 year ago

I checked your DID history, it should be some changes that happened between 2022/09/21 to 2022/10/21. If you can recall what you did (any usage includes update recovery DIDs, metadata, resync wallet DB, failed DID spend, etc.), it will help. The last DID spend is a normal create DID message spend. Usually, it is for setting NFT's DID. But at that moment, your local DID info is changed for some reason and that caused your DID to be sent to a new puzzle hash. Just in case you forgot, did you install the latest did_find branch and restart the wallet?

codephunk commented 1 year ago

Thank you. Yes, I always fetch the latest did_find updates and reinstall / restart the wallet. One thing regarding wallet db resyncing. I had my minting process running on my farmer - and it minted on demand. So it wasn't constantly minting NFTs, only when a certain amount of XCH had been sent to a receive address. I was also using the same keys and wallet on another machine, where I was using the Chia client. On that machine I often resynced the wallet db. I also resynced the wallet db on the farmer, after I wasn't able to use the DID anymore.

ytx1991 commented 1 year ago

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.

codephunk commented 1 year ago

No, they run on different IPs. What derivation index would you suggest?

codephunk commented 1 year ago

@ytx1991 The did_find has been removed. Is this merged into 1.8 now?

ytx1991 commented 1 year ago

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

ytx1991 commented 1 year ago

Let me know if you have more questions.

codephunk commented 1 year ago

Why is this closed? I still don't have my DID back.

Let me know if you have more questions.

Yes, I asked what derivation index you would recommend. I'm currently at 6600. Still doesn't work.

And is there a way to keep the derivation index when I'm deleting the wallet db?

MumfMeisterT commented 1 year ago

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?

MumfMeisterT commented 1 year ago

@codephunk Can you try the 1.8.0-rc1 build to see if this resolves? https://github.com/Chia-Network/chia-blockchain/releases

codephunk commented 1 year ago

@codephunk Can you try the 1.8.0-rc1 build to see if this resolves? https://github.com/Chia-Network/chia-blockchain/releases

Yes - thank you! Will try that :)

codephunk commented 1 year ago

@codephunk Can you try the 1.8.0-rc1 build to see if this resolves? https://github.com/Chia-Network/chia-blockchain/releases

I tried it but the DID wallet has still a balance of zero. I also tried the did_find_lost_did command again, but I got the same response as before: Request failed: {'error': 'Cannot recover DID 567d6ee0f9520613a96a0fb54229dc07c40a3e925e3a9db5b2d00d180553a85e because the last spend updated recovery_list_hash/num_verification/metadata.', 'success': False}

I didn't rebuild the Wallet DB though. Should I try that?

codephunk commented 1 year ago

@MumfMeisterT @ytx1991

jjldv commented 1 year ago

im on 1.8.2, and just one DID shows up, the nft wallets appear with its DID linked but no DID record on my wallet.

i already deleted the db wallet and resync, still one DID 2 lost (nft wallets show up, but not as a DID linked in the GUI)