SmartSPV – A better Simplified Payment Verification for Smartphones [combined summary]



Individual post summaries: Click here to read the original discussion on the bitcoin-dev mailing list

Published on: 2014-04-25T04:59:39+00:00


Summary:

In an email conversation between Sergio Lerner and Mike Hearn, the issue of handling 17K block headers a day in NimbleCoin currency's SPV mode was discussed. Lerner proposed a variation of the standard headers-only SPV mode called SmartSPV, which he believes could also be implemented by BitcoinJ for Bitcoin. This variation allows a smartphone to maintain a fairly accurate state of the wallet balance without downloading all the missing headers, while also conserving battery life and time.Lerner explained that with the freedom to specify and control the headers, SPV evaluations of work can have log(n) scaling. He provided a link to a mail archive discussion where this concept was further explained. Additionally, to address the issue of headers in reverse, Lerner referred to a wiki page on reverse header-fetching sync authored by Gmaxwell. This page offers ideas and insights on how to handle header syncing more efficiently.NimbleCoin is a new cryptocurrency that utilizes the FastBlock5 protocol to achieve near-instant payments. Due to merged mining, each block header can be as large as 700 bytes. However, when bandwidth is limited or clients are disconnected from the internet for extended periods, SmartSPV becomes crucial. In Smart-SPV mode, if a client is missing block headers, two actions occur simultaneously: the client starts downloading block headers from the last one solved backward, and it also begins downloading the block headers from the first missing header forward. While catching up with the missing blocks, the wallet balance may not be entirely reliable. However, any new confirmed payment received or made will increase and reflect the balance.The concept of live blocks and live transactions is introduced in this context. A live block is flagged as "LIVE" and this flag is permanently stored with the block. A live transaction refers to a transaction included in a live block. When a live transaction is confirmed by six blocks flagged as "LIVE," it is considered mature. All mature transactions, including those in blocks rooted at the last checkpoint and finishing in the last live block, are scanned and used to compute the wallet balance.Despite potential orphaned branches, the wallet acknowledges and processes payments correctly because it always modifies the balance according to mature transactions. As long as the SPV client clock is accurately synchronized, the Smart-SPV protocol does not pose any additional security risks beyond the known limitations of SPV.


Updated on: 2023-08-01T08:59:38.707667+00:00