<oembed><type>rich</type><version>1.0</version><title> wrote</title><author_name>npub1txgfckk6qxy5yh6c7sag0m4sjycag8fn9xx7jj5efpf05s7ztt7s5grmss</author_name><author_url>https://yabu.me/npub1txgfckk6qxy5yh6c7sag0m4sjycag8fn9xx7jj5efpf05s7ztt7s5grmss</author_url><provider_name>njump</provider_name><provider_url>https://yabu.me</provider_url><html>📅 Original date posted:2023-08-04&#xA;🗒️ Summary of this message: Adding a field to silent payment addresses to encode expiration dates in terms of days after an epoch can fix the risk of non-expiring addresses in Bitcoin. Custom compact encoding can be used for different levels of granularity.&#xA;📝 Original message:&#xA;I agree. Non-expiring addresses are a significant risk to bitcoin users.&#xA;&#xA;On 2023-08-04 (Fri) at 17:39:03 +0000, Peter Todd via bitcoin-dev wrote:&#xA;&gt; Fixing this is easy: add a 3 byte field to silent payments addresses, encoding&#xA;&gt; the expiration date in terms of days after some epoch. 2^24 days is 45,000&#xA;&gt; years, more than enough. Indeed, 2 bytes is probably fine too: 2^16 days is 180&#xA;&gt; years. We&#39;ll be lucky if Bitcoin still exists in 180 years.&#xA;&#xA;Instead of a fixed width nDays, consider a custom compact encoding with&#xA;the position of the first 0-bit indicating the number of extension bytes&#xA;and the encoded granularity.&#xA;&#xA;bytes | prefix     | usable bits | granularity | max expiration&#xA;------|------------|-------------|-------------|---------------&#xA;1     | 0b0        |   7         | year        | 128 years&#xA;2     | 0b10       |  14         | week        | 315 years&#xA;3     | 0b110      |  21         | day         | 5700 years&#xA;4     | 0b1110     |  28         | block       | 5100 years&#xA;5     | 0b11110    |  35         | ???         | ???&#xA;6     | 0b111110   |  42         | ???         | ???&#xA;7     | 0b1111110  |  49         | ???         | ???&#xA;8     | 0b11111110 |  56         | ???         | ???&#xA;&#xA;For address expiration, year or week expiration will typically be&#xA;sufficiently granular, but for rare occasions more granularity can be&#xA;encoded with longer addresses. This method also degrades cleanly even if&#xA;the same address format is still in use in 100 or 300 years.&#xA;&#xA;I included block-based expiration to enable SP users to match CLTVs&#xA;embedded in their scripts, e.g.&#xA;  &lt;2 years&gt; OP_CLTV &lt;recovery_path&gt; OP_VAULT_RECOVER&#xA;or&#xA;  &lt;2 years&gt; OP_CLTV &lt;backup_key&gt; OP_CHECKSIG&#xA;&#xA;Best,&#xA;&#xA;--Brandon</html></oembed>