Known issues
This page lists what’s known to be wrong or unexplained. Each item says what is known, and nothing more.
A memory-safety bug in uBitcoin
Section titled “A memory-safety bug in uBitcoin”Status: reported to the maintainer: [REPORT STATUS]
Affected: uBitcoin 0.2.0, the Bitcoin library this firmware uses. Other versions weren’t checked.
Cause. When uBitcoin reads a transaction, its parsing function (Tx::from_stream) reads the number of inputs and the number of outputs as a single byte. Bitcoin allows larger counts, written in a longer form. So a transaction with 253 or more inputs or outputs is read wrongly.
Effect. Once a count is misread, the rest of the transaction is misread too, and the library can write outside the memory it set aside. On the device that corrupts memory, and the device crashes and restarts. Transactions that large do occur on the network. Because a PSBT can carry copies of earlier transactions, the problem is reachable from data the camera scans.
How this firmware avoids it. The scanned PSBT never reaches uBitcoin:
- The firmware reads the scanned PSBT with its own strict parser, which checks every length and refuses anything it doesn’t expect.
- It checks the transaction independently (see How it works).
- It then builds a new, minimal PSBT from the verified values only, and only that rebuilt copy is given to uBitcoin to sign. It is kept within limits the library handles (at most 50 inputs and 20 standard outputs, with no extra data), so it never contains the long count format.
This also closes a second weakness in the library: uBitcoin can let one copy of an input’s amount silently replace another, verified one. The rebuilt PSBT carries only the verified amount.
If you use uBitcoin in your own project: don’t parse untrusted transactions with version 0.2.0. Limit input sizes and counts before parsing, or parse with your own code first.
Sparrow’s QR codes for multi-input spends
Section titled “Sparrow’s QR codes for multi-input spends”What happens. For a transaction that spends more than one coin, the device needs the earlier transactions that created each coin (see How it works). In testing with Sparrow Wallet 2.5.5 on signet, Sparrow’s animated QR codes for multi-input transactions didn’t include them, so the device refused, as it’s designed to.
What’s known:
- Sparrow decides per device type whether its QR exports include the earlier transactions. Its source code says it does so for one device type with two or more inputs. With the wallet’s device type shown as that type in Sparrow’s settings, the QR still left them out. (The settings label isn’t proof of how Sparrow stored the wallet internally.)
- Sparrow’s saved transaction file did include them, from the same wallet. So the data exists; only the QR export left it out.
What isn’t known: why. This isn’t called a bug in Sparrow: the cause hasn’t been found, and it may be a setting or a mismatch in how the wallet was imported.
Workaround: save the transaction to a file in Sparrow, and show the file as an animated QR code with the firmware’s tools/psbt_show (it needs Node.js). One multi-input transaction was signed and confirmed this way. Single-input spends work directly from Sparrow’s QR. See step 11.
Random restarts
Section titled “Random restarts”What happens. The ESP32 DevKit has occasionally restarted by itself while the screen was being tapped: nine times in one session, and once during a transaction review, where nothing was signed. Each was a power-on reset, with no crash report, watchdog or brownout message.
What’s thought, not confirmed: loose wiring or the USB cable. There were none after the wiring was checked, but one happened again later.
What to do: check every jumper wire and the USB cable. If restarts happen during a review, nothing is signed: the device only signs after your final confirmation.
Other open items
Section titled “Other open items”These are covered in more detail elsewhere:
- Large single QR codes are untested. Codes of 300 or more characters were never read as a single code. Transactions arrive as animated codes with small frames, which work. See Security and limits.
- Two minutes of continuous scanning without a brownout wasn’t verified.
- 5V signals on a 3.3V pin of the camera board with the tested USB-TTL adapter. A resistor divider is recommended but wasn’t fitted. See Flashing the ESP32-CAM.
- Very low fee rates are cut short on the review summary: 0.29 sat/vB shows as 0.2. The fee itself is exact.