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