<oembed><type>rich</type><version>1.0</version><title>Rusty Russell [ARCHIVE] wrote</title><author_name>Rusty Russell [ARCHIVE] (npub1zw…hkhpx)</author_name><author_url>https://yabu.me/npub1zw7cc8z78v6s3grujfvcv3ckpvg6kr0w7nz9yzvwyglyg0qu5sjsqhkhpx</author_url><provider_name>njump</provider_name><provider_url>https://yabu.me</provider_url><html>📅 Original date posted:2019-11-11&#xA;📝 Original message:&#xA;Yaacov Akiba Slama &lt;ya at slamail.org&gt; writes:&#xA;&gt; Hi Rusty.&#xA;&gt;&#xA;&gt; On 08/11/2019 05:09, Rusty Russell wrote:&#xA;&gt;&gt; Hi Yaacov,&#xA;&gt;&gt;          I&#39;ve been pondering this since reading your comment on the PR!&#xA;&gt;&gt;&#xA;&gt;&gt;          As a fan of standards, I am attracted to UBL (I&#39;ve chaired an&#xA;&gt;&gt; OASIS TC in the past and have great respect for them); as a fan of&#xA;&gt;&gt; simplicity I am not.  Forcing UBL implementation on wallet providers is&#xA;&gt;&gt; simply not going to happen, whatever I were to propose.&#xA;&gt;&#xA;&gt; In fact, using UBL in LN specification is simpler than trying to &#xA;&gt; understand the semantic of each field needed by businesses. You are &#xA;&gt; right that using such a standard put the burden into wallet providers &#xA;&gt; instead of LN developers, but as a wallet (breez) provider, I can say that:&#xA;&gt;&#xA;&gt; 1) Most money transactions (currently in fiat) are between users and &#xA;&gt; companies and not between two users. If we want to replace FIAT by &#xA;&gt; bitcoin, we need to create an infrastructure which can be used by &#xA;&gt; businesses. That means that LN needs to be able to be integrated easily &#xA;&gt; into POS systems. So, as a wallet provider who want to help the &#xA;&gt; transition from fiat to bitcoin, I need to be able to support standards &#xA;&gt; even if that means that I have to implement using/parsing big and &#xA;&gt; complicated standards.&#xA;&gt;&#xA;&gt; For simple user to user transaction, the wallet can decide to use only a &#xA;&gt; subset of the fields defined by the standard.&#xA;&gt;&#xA;&gt; 2) From a technical point of view, it seems that there are already UBL &#xA;&gt; libraries in java and c#. I don&#39;t think such library is hard to write in &#xA;&gt; go, rust.., so every wallet implementation can use them.&#xA;&#xA;That is not the problem.  The problem is that our order flow is simple:&#xA;&#xA;        Seller: Offer&#xA;        Buyer: Invoice Request&#xA;        Seller: Invoice (or updated Offer)&#xA;        Buyer/Seller: Payment &amp; Acknowledgement (atomic)&#xA;&#xA;(This could, of course, fit into a larger business flow.)&#xA;&#xA;The closest UBL flow seems to be:&#xA;&#xA;        Seller: Quotation&#xA;        Buyer: Order&#xA;        Seller: (Prepayment)Invoice (or updated Quotation)&#xA;&#xA;It&#39;s also worth noting that, even compressed, none of the UBL examples&#xA;fit into the 1023 byte limit of the existing invoice format:&#xA;&#xA;        UBL-Quotation-2.1-Example.xml: 1864 bytes (gz)&#xA;        UBL-Order-2.1-Example.xml: 2515 bytes (gz)&#xA;        UBL-Invoice-2.1-Example.xml: 3163 bytes (gz)&#xA;&#xA;Indeed, that Quotation alone requires a 32x32 QR code.&#xA;&#xA;&gt;&gt; &#x9;However, since invoices/offers and UBL are both structures, we&#xA;&gt;&gt; should have an explicit mapping between the two.  What fields should&#xA;&gt;&gt; have their own existence in the invoice/offer and what should be in a&#xA;&gt;&gt; general UBL field is a question we have to think on further.&#xA;&gt; I agree that we don&#39;t want duplication. This is the reason, I propose to &#xA;&gt; use only ubl structure and add in the ln standard invoice an ubl &#xA;&gt; &#34;opaque&#34; field which will be self-contained and only add in the &#xA;&gt; invoice/offer/.. the fields specific to ln.&#xA;&#xA;Except we need to go through the UBL spec and indicate exactly what&#xA;fields are permitted, and which are required.&#xA;&#xA;Many UBI fields are not amenable to machine interpretation (eg. note&#xA;fields).  These must be either explicitly exposed to the buyer (in case&#xA;the seller uses them) such as shipping conditions, or explicitly&#xA;forbidden/ignored.&#xA;&#xA;This is not a small task, and required intimiate knowledge of the UBL&#xA;spec.  It&#39;s not enough just to make something *look* like UBL.&#xA;&#xA;Does anyone have expertise in this area?  Shall we form a sub-group to&#xA;investigate this properly?&#xA;&#xA;Thanks!&#xA;Rusty.</html></oembed>