<oembed><type>rich</type><version>1.0</version><title>Peter Todd [ARCHIVE] wrote</title><author_name>Peter Todd [ARCHIVE] (npub1m2…a2np2)</author_name><author_url>https://yabu.me/npub1m230cem2yh3mtdzkg32qhj73uytgkyg5ylxsu083n3tpjnajxx4qqa2np2</author_url><provider_name>njump</provider_name><provider_url>https://yabu.me</provider_url><html>📅 Original date posted:2023-08-05&#xA;🗒️ Summary of this message: Adding a field to silent payment addresses to encode expiration dates is suggested, with different byte lengths for different granularities.&#xA;📝 Original message:&#xA;On Fri, Aug 04, 2023 at 03:27:17PM -0700, Brandon Black wrote:&#xA;&gt; I agree. Non-expiring addresses are a significant risk to bitcoin users.&#xA;&gt; &#xA;&gt; On 2023-08-04 (Fri) at 17:39:03 +0000, Peter Todd via bitcoin-dev wrote:&#xA;&gt; &gt; Fixing this is easy: add a 3 byte field to silent payments addresses, encoding&#xA;&gt; &gt; the expiration date in terms of days after some epoch. 2^24 days is 45,000&#xA;&gt; &gt; years, more than enough. Indeed, 2 bytes is probably fine too: 2^16 days is 180&#xA;&gt; &gt; years. We&#39;ll be lucky if Bitcoin still exists in 180 years.&#xA;&gt; &#xA;&gt; Instead of a fixed width nDays, consider a custom compact encoding with&#xA;&gt; the position of the first 0-bit indicating the number of extension bytes&#xA;&gt; and the encoded granularity.&#xA;&gt; &#xA;&gt; bytes | prefix     | usable bits | granularity | max expiration&#xA;&gt; ------|------------|-------------|-------------|---------------&#xA;&gt; 1     | 0b0        |   7         | year        | 128 years&#xA;&gt; 2     | 0b10       |  14         | week        | 315 years&#xA;&gt; 3     | 0b110      |  21         | day         | 5700 years&#xA;&gt; 4     | 0b1110     |  28         | block       | 5100 years&#xA;&gt; 5     | 0b11110    |  35         | ???         | ???&#xA;&gt; 6     | 0b111110   |  42         | ???         | ???&#xA;&gt; 7     | 0b1111110  |  49         | ???         | ???&#xA;&gt; 8     | 0b11111110 |  56         | ???         | ???&#xA;&gt; &#xA;&gt; For address expiration, year or week expiration will typically be&#xA;&gt; sufficiently granular, but for rare occasions more granularity can be&#xA;&gt; encoded with longer addresses. This method also degrades cleanly even if&#xA;&gt; the same address format is still in use in 100 or 300 years.&#xA;&#xA;1) Having the granularity of the limit depend on *when* the limit is to be&#xA;applied in a UX nightmare. It is far simpler to just pick a useful granularity,&#xA;and include enough bytes of integer to work until well into the future. 3&#xA;bytes, 24-bits, of days is 45,000 years. That&#39;s plenty.&#xA;&#xA;2) Your suggestion would result in a protocol that degrades over time, as the&#xA;granularity of *newly* created addresses goes up. This isn&#39;t like CTV/CLTV,&#xA;where we&#39;re creating something now with a limit in the future. 100 years from&#xA;now - if silent payments still exists - people will still want to create silent&#xA;payment addresses that expire, say, 30 days in the future. Your suggestion does&#xA;not allow that.&#xA;&#xA;-- &#xA;https://petertodd.org &#39;peter&#39;[:-1]@petertodd.org&#xA;-------------- next part --------------&#xA;A non-text attachment was scrubbed...&#xA;Name: signature.asc&#xA;Type: application/pgp-signature&#xA;Size: 833 bytes&#xA;Desc: not available&#xA;URL: &lt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20230805/82374bb3/attachment.sig&gt;</html></oembed>