Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increase QR code display speed for multipart QR signature data for external signer accounts #1276

Open
2 of 7 tasks
renesy opened this issue Jul 31, 2023 · 2 comments
Open
2 of 7 tasks
Labels
Support Tracks issues or requests related to troubleshooting, answering questions, and user assistance. wontfix This will not be worked on

Comments

@renesy
Copy link

renesy commented Jul 31, 2023

I'm submitting a ...

  • Bug report
  • Feature request
  • Support request
  • Other
  • What is the current behavior and expected behavior?

When using an external QR-code signer account (like Polkadot Vault smartphone app) this extension displays the to-be-signed transaction data as QR codes. Larger data is split across multiple QR codes which are changed automatically by the extension. This feature request suggests to increase the frequency at which those QR codes are changed, because the current frequency is too low for very large data (like 900 kB for registrar.register).

  • Expected behavior

Large transaction data (~1 MB) can be transferred to an external QR signer account in a short amount of time.

  • What is the motivation for changing the behavior?
  1. Very long QR code scanning sessions (>30min) are bad user experience
  2. Very long signing sessions lead to timeouts for some applications (like Multix)
  3. At the moment it's not possible to call registrar.register with 900 kB wasm code and Multix + polkadot{.js} extension + Polkadot Vault due to slow QR code display and application timeout
  4. The Polkadot Vault smartphone app is already capable of scanning QR codes at high frequency. Tested with: https://metadata.parity.io/?tab=1#/polkadot

Therefore, my suggestion is:

  1. Increase the QR code change frequency of the extension to the same level as: https://metadata.parity.io/?tab=1#/polkadot
  2. Or, make the frequency user configurable if faster and slower QR code scanners need to be accommodated at the same time.
  • Please tell us about your environment:
  • Version: Browser extension version 0.44.1, Chromium version 115.0.5790.110 (Official Build), Polkadot Vault version 6.1.2

  • Environment: Chromium with polkadot{.js} extension on Linux and Polkadot Vault on Android and iOS

    • Node.js
    • Browser
    • Other (limited support for other environments)
@jacogr
Copy link
Member

jacogr commented Jul 31, 2023

The metadata scanning uses Raptor, which is not the "normal" QR display, rather an adaptation of fountain codes, which is a fascinating theory and certainly solves real-world issues. This means that and adaptation of that not only requires a change on the extension, but also in all apps that read QR codes.

With the current implementation rate is difficult to optimize - older phones always have issues with faster rates. (We had numerous issues in the past with increasing the rate with the "normal-as-used-QR" display)

As of now, this is sadly a "won't fix" (or rather a "won't touch", at some point if there are libraries available to generate these on the fly in the browser, i.e. a pure JS implementation and the apps consuming these have support for it, can revisit)

@jacogr jacogr added the wontfix This will not be worked on label Jul 31, 2023
@renesy
Copy link
Author

renesy commented Jul 31, 2023

Thanks for the explanation @jacogr

Could you elaborate on the second idea: Making the rate user configurable. Or even adaptive based on data size?

  • User configurable
    Initially the extension uses the current "save" default rate.
    A QR code rate setting (e.g. "normal", "fast") is available for users who granted the QR code camera access to the extension.

  • Automatic adaptive
    The extension increases the QR code rate according to total data size (e.g. >100 kB). Currently the signing process of large data is broken for everyone. This allows signing for faster devices with no disadvantage for slower devices (no signing either way).

@TarikGul TarikGul added the Support Tracks issues or requests related to troubleshooting, answering questions, and user assistance. label Oct 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Support Tracks issues or requests related to troubleshooting, answering questions, and user assistance. wontfix This will not be worked on
Projects
Development

No branches or pull requests

3 participants