From bastien at acinq.fr Wed Apr 1 07:59:00 2020 From: bastien at acinq.fr (Bastien TEINTURIER) Date: Wed, 1 Apr 2020 09:59:00 +0200 Subject: [Lightning-dev] A better encoding for lightning invoices Message-ID: Good morning list, In Bolt 11 we decided to use bech32 to encode lightning invoices. While bech32 has some nice properties, it isn't well suited for invoices. The main drawback of Bolt 11 invoices is their size: when you start adding routing hints or rendezvous onions, invoices become huge and hard to share. Empirical evidence shows that most lightning transactions are done over Twitter (73,41% of all lightning payments in 2019 were made via tweets). Since Twitter only allows up to 280 characters per tweet, this has severely impacted the development of new features for lightning. Anything that made an invoice bigger ended up being unused as users were left without any option to share those invoices. After several months of research and experimentation at Acinq Research, we have come up with a highly efficient invoice encoding, optimized primarily for Twitter. This has caused further delays in the development of our iOS wallet, but we felt this was a much higher priority. Our encoding uses an AI-optimized mapping from 11-bit words to Twitter emojis. Early results show that emoji invoices are more than 2 times smaller than legacy invoices. Reckless users are already using this in production: https://twitter.com/realtbast/status/1245258812279398400?s=20 https://twitter.com/acinq_co/status/1245258815597096960 There is a spec PR available at [1], along with reference eclair code [2]. We plan to release this feature in the next update of our Phoenix wallet [3]. We'd like feedback from this list on how to improve this further. We believe the same encoding could be used to compress the bitcoin blockchain. With more training data, we believe our AI-optimized mapping could allow bitcoin blocks to fit in a single tweet; we would then be able to use Twitter feeds to store the whole blockchain. Cheers, Bastien [1] https://github.com/lightningnetwork/lightning-rfc/pull/762 [2] https://github.com/ACINQ/eclair/tree/emoji-encoding [3] https://phoenix.acinq.co/ -------------- next part -------------- An HTML attachment was scrubbed... URL: