public inbox for bitcoindev@googlegroups.com
 help / color / mirror / Atom feed
* [Bitcoin-development] BIP 70 refund field
@ 2014-03-28 11:07 Mike Hearn
  2014-03-28 11:25 ` Andreas Schildbach
                   ` (2 more replies)
  0 siblings, 3 replies; 27+ messages in thread
From: Mike Hearn @ 2014-03-28 11:07 UTC (permalink / raw)
  To: Bitcoin Dev

[-- Attachment #1: Type: text/plain, Size: 1739 bytes --]

Modern devices like smartphones and tablets do not have swap files. This
design is chosen to ensure responsive, fluid UI that can avoid blocking on
disk regardless of how much multi-tasking is done, but it creates ripples
that impact everything else.

One implication of this is that on these devices, we cannot store all keys
or transactions in memory forever. BIP 70 has an expiry field for
PaymentRequests that we can use to allow us to eventually stop loading
those keys into RAM - at that point payments to those keys would no longer
be recognised. But there's no equivalent for refund addresses.

More generally, though we re-used the output structure to define the
refund, we didn't (for some reason that I forgot) reuse PaymentDetails,
even though the payment details for a refund are indeed PaymentDetails.

Though I am loathe to go back and redesign this part of BIP 70 so soon
after we shipped v1, it seems to me like the refund feature may be hard to
implement on phones if there's no time limit for when you can receive a
refund. Otherwise a wallet has to be looking out for refunds for payments
you may have made years ago. So perhaps we should add a new refund field
that embeds a PaymentDetails structure instead of being just a list of
outputs.

We could try and solve this problem some other way purely internally, by
doing a kind of wallet-specific swapping process in which things like Bloom
filters are calculated without all keys in them being held in memory at
once (perhaps caching filters for old parts of the key chain on disk), so
you can have "infinite" wallets, but eventually the huge Bloom filters that
would result would hurt efficiency in other ways. So key expiry seems
pretty fundamental to scalability.

[-- Attachment #2: Type: text/html, Size: 1919 bytes --]

^ permalink raw reply	[flat|nested] 27+ messages in thread

end of thread, other threads:[~2014-03-31  9:23 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-28 11:07 [Bitcoin-development] BIP 70 refund field Mike Hearn
2014-03-28 11:25 ` Andreas Schildbach
2014-03-28 11:31   ` Mike Hearn
2014-03-28 16:59     ` Andreas Schildbach
2014-03-28 18:19       ` Mike Hearn
2014-03-28 20:56         ` Andreas Schildbach
2014-03-29  9:27           ` Roy Badami
2014-03-29 13:29             ` Mike Hearn
2014-03-30 17:21               ` Andreas Schildbach
2014-03-28 11:38   ` Wladimir
2014-03-28 11:45     ` Tamas Blummer
2014-03-28 11:46       ` Mike Hearn
2014-03-28 11:54         ` Tamas Blummer
2014-03-28 12:27           ` Mike Hearn
2014-03-28 12:55             ` Tamas Blummer
2014-03-28 13:00               ` Mike Hearn
2014-03-28 13:09                 ` Tamas Blummer
2014-03-28 11:30 ` Tamas Blummer
2014-03-28 13:18   ` Tamas Blummer
2014-03-28 14:01     ` Gavin Andresen
2014-03-28 14:06       ` Mike Hearn
2014-03-28 14:27       ` Tamas Blummer
2014-03-28 15:23         ` Mike Hearn
2014-03-28 15:26           ` Tamas Blummer
2014-03-28 16:34             ` Mike Hearn
2014-03-28 16:45               ` Tamas Blummer
2014-03-31  9:23 ` Peter Todd

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox