paritytech / substrate

Substrate: The platform for blockchain innovators
Apache License 2.0
8.39k stars 2.65k forks source link

Incorrect processing of updates of the storage collection that stores empty tuples #14651

Open mezrin opened 1 year ago

mezrin commented 1 year ago

Is there an existing issue?

Experiencing problems? Have you tried our Stack Exchange first?

Description of bug

Issues:

Steps to reproduce provided below.

Collection "Account" of the pallet "uniques" stores "empty tuple" / "no record". https://github.com/paritytech/substrate/blob/cb450b626ac8e8848db76933e114e57e7cce3e8d/frame/uniques/src/lib.rs#L180 Another collection "Asset" of the same pallet stores a struct. And for "Asset" all works fine. https://github.com/paritytech/substrate/blob/cb450b626ac8e8848db76933e114e57e7cce3e8d/frame/uniques/src/lib.rs#L208 Seems there are some issues with the Substrate internal logic or API that arise when we request data for the collection that stores empty tuple.

We have the same issue with our own app that communicates with the blockchain node directly. So it's not a bug in PolkadotJS.

Steps to reproduce

Precondition

Scenario

bkchr commented 1 year ago

@jacogr I assume this is just some UI thing of polkadotjs?