apps icon indicating copy to clipboard operation
apps copied to clipboard

Specific core mask is displayed incorrectly on PJS apps

Open seadanda opened this issue 1 year ago • 6 comments

  • I'm submitting a ... Bug report

  • What is the current behavior and expected behavior? An incorrect core mask was reported in https://github.com/paritytech/polkadot-sdk/issues/3614 More details on the issue.

It was pointed out that this is just an incorrect representation of the core mask b01010101010101010101010101010101010101010101010101010101010101010101010101010101, which equates to UUUUUUUUUU in Unicode. When a region is interlaced 50% we end up with this core mask. This will happen quite often and should be displayed in a way that is consistent with any other core mask.

It appears that apps tries to decode it as UTF-8 before (correctly) decoding it as hex or an 80 bit binary string. It should not try to decode this field as UTF-8.

  • Please tell us about your environment: Easily reproduced by checking the Rococo Coretime Chain state broker.regions and ctrl+F UUUUUUUUUU, comparing to the other regions and how they are displayed.

    • Version: Polkadot parachain v4.0.0 api v10.11.2 apps v0.133.2-119

    • Environment: Browser

seadanda avatar Mar 08 '24 08:03 seadanda

This issue is related to the PJS API repository, as it arises during the attempt to format regionId using toHuman()

Szegoo avatar Mar 08 '24 09:03 Szegoo

Maybe a code owner could move this issue to that repo

seadanda avatar Mar 08 '24 12:03 seadanda

This is in the queue to check further on Thursday! Thanks for the patience.

TarikGul avatar Mar 12 '24 01:03 TarikGul

So I looked into this (not to deep as its been a long day). But the console is logging:

params: initValue: No default value for type PalletBrokerCoreMask from {"info":10,"name":"mask","type":"PalletBrokerCoreMask"}, using defaults

params: findComponent: No pre-defined component for type PalletBrokerCoreMask from Plain: {"info":10,"name":"mask","type":"PalletBrokerCoreMask"}

Which is a good start. I'll continue looking into this in the morning.

TarikGul avatar Mar 15 '24 02:03 TarikGul

Ahh nvm the above warnings i posted have to do with the params.... Not connected to the above issue.

TarikGul avatar Mar 15 '24 03:03 TarikGul

Sorry for the little delay. This is a bit deeper than I thought, but it goes all the way to the common repo. Basically the storage key for mask is valid ascii which is interpreted in the api as that here.

Looking into a more specific solution now.

TarikGul avatar Mar 19 '24 23:03 TarikGul