-
Notifications
You must be signed in to change notification settings - Fork 8
Feedback on specification #2
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
Comments
Correct. However, the "sender" could repeat the individual QRs (interleaved randomly) to achieve the same sort of forward error correction.
I've just changed it to use base 36 numbers in the header. It's still 8 characters total, but can now encode up to 1295 QR codes in a series. I'm curious what the practical limit will be for normal use, but 255 QR's felt too low and we were wasting those bits in the header anyway. Coldcard can handle PSBT files up to 2 megabytes, and this can transfer them... but I think higher counts only make sense when the QR itself is quite small.
We can support up to 36 or so different encodings, so I felt we should start small. For the JSON, CBOR and Text encodings, the contents are typically self-describing anyway, so no need to repeat that at this layer. If there are other binary file formats specific to Bitcoin use, I'm happy to add them.
Yes, by design.
We would normally work within existing standards, but some standards are just too complex for their value-add. |
Repeating individual QRs doesn't help, because you may end up repeating fragments the client already have and delay the ones they don't. In fact, fountain codes is an extension of your idea that does help: a single QR may contain several fragments XOR'ed together and can achieve the desirable property that any I believe the lack of erasure coding seems like the biggest disadvantage of BBQr. FWIW, I estimate implementing fountain codes from scratch is less work than implementing even the limited zlib codec mandated by the BBQr spec. You need a pseudo random function, code to output a random subset of your fragments to be XOR'ed together. On the receiving side, you track XOR'ed fragments so you can factor out constituent fragments when they arrive. |
I should note that BBQR has another major advantage over BC-UR - efficiency when using base32 encoding and compression. As an example: 669 byte PSBT, single QR UR: 1367 chars BBQr HEX: 1346 chars (669*2+8) The bytewords encoding used by BC-UR is roughly as efficient as hex encoding. Base32 encoding provides significant savings, and performing compression of the data adds on top of that. |
Implemented ;) |
As requested, my feedback. It's difficult to consider this without comparing against the dominant BC-UR standard. The major advantage compared to BC-UR seems to be the simplicity of the scheme. However, there are several drawbacks:
BC-UR does not have these drawbacks, so they must be weighed against the simplicity of implementation. I can't speak knowledgeably to the capability of embedded devices, but certainly it has been possible for many hardware wallet implementors to send and receive BC-UR formatted QRs.
Further, this adds another QR standard. While it is simple to add support for scanning this format, with BC-UR already well established the choice of which standard to use when displaying an animated sequence must probably be left to the user, burdening them with a technical detail they are unlikely to understand. There should be a very good reason to have to put in the effort of educating an entire userbase, and adding this additional complexity to the UX flow of many common operations.
The text was updated successfully, but these errors were encountered: