chia-blockchain icon indicating copy to clipboard operation
chia-blockchain copied to clipboard

[Bug] NFT DID ownership association is handled incorrectly in some cases

Open greimela opened this issue 1 year ago • 1 comments

What happened?

There are some situations where the association of NFTs and DIDs is not handled correctly.

One issue seems to be this code in the wallet: https://github.com/Chia-Network/chia-blockchain/blob/e4d4c8f57d3486fd37563c58d17441320d532210/chia/wallet/nft_wallet/nft_wallet.py#L713-L722 It decides to keep the previous DID in the metadata if I transfer the NFT to one of my own addresses. However, in case I received that NFT directly on mint, by being the target_address, I actually don't own the currently attached DID.

The NFT ownership layer itself also has a condition where it only requires a DID announcement if I want to change the DID. But I can theoretically keep the minter DID attached forever, if I wanted to...

And since it's the wallet deciding whether it wants to keep the DID in the NFT, there could be one wallet in the ecosystem that handles it differently.

So I basically can't trust any DID assignment as soon as a change of the p2_puzhash occurs, e.g. when cancelling an offer on chain. But the Chia wallet will still show it as being attached to my DID.

Version

1.6.0

What platform are you using?

macOS

What ui mode are you using?

GUI

Relevant log output

No response

greimela avatar Oct 26 '22 14:10 greimela

@ytx1991 Can we reopen this issue?? There is still a discrepancy based on the owner DID.

The Owner DID is not properly removed when performing a transfer to an xch address. This causes issues in the chia client when a project mints NFTs that have target addresses.

  • The chia client identifies the owner DID of the minting project (since it has not been removed during transfer)
  • The client then errors as it tries to identify the keyset associated with the DID (which it will not be able to since it is another users keyset)
  • Users are becoming confused with these extra DIDs and NFT wallets appearing the client
  • Marketplaces/explorers have established a workaround to only show a DID owner if the most recent activity is moving the NFT to a profile
  • This workaround leads marketplaces/explorers to incorrectly display NFT DIDs (for instance NFTs minted with DIDs and without target addresses must be shown as having the xch address as the owner because the onchain records are identical to if the minting transaction has targets)
  • This workaround creates extra work for minters as when they are showing off their project they now need to manually move the NFTs to the profile for marketplaces/explorers to recognize the correct owner DID (GUI client does not allow move to profile as it is already associated with the profile)

Also, a result of this issue has been reported under issue #14748

BrandtH22 avatar Apr 04 '23 18:04 BrandtH22