Author: slush 2015-01-23 19:19:40
Published on: 2015-01-23T19:19:40+00:00
In a discussion about transaction validation and hash calculations, the participants acknowledge that there is room for optimization to reduce complexity and improve security. One suggestion is to use a table to avoid retransmitting reused transactions, which can be done in constant memory without dynamic allocation. The current solution is slow but has no limitations on transaction size, though there are significant restrictions on memory in the embedded world. The TREZOR device uses a powerful MCU to perform validations and calculations, and using SIGHASH_WITHINPUTVALUE or a similar approach could reduce hardware costs significantly. The transaction is streamed along with its inputs interleaved in order to reduce memory requirements to two midstates and a value accumulator but may require resending the transaction in some cases. In the worst-case scenario, where there are around 800 inputs spending from 100KB input transactions, sending about 800MB of data could take up to half an hour if hashing runs at 45KB/s or slower.
Updated on: 2023-06-09T15:57:32.358175+00:00