Rusty Russell [ARCHIVE] on Nostr: 📅 Original date posted:2020-02-13 📝 Original message: Bastien TEINTURIER ...
📅 Original date posted:2020-02-13
📝 Original message:
Bastien TEINTURIER <bastien at acinq.fr> writes:
> Hi Rusty,
>
> Thanks for the answer, and good luck with c-lightning 0.8.1-rc1 ;)
... Now -rc2. I actually had a RL use for lightning (OMG!), and sure
enough found a bug.
> I've been thinking more about improving my scheme to not require any sender
> change, but I don't think that's possible at the moment. As with all
> Lightning
> tricks though, once we have Schnorr then it's really easy to do.
> Alice simply needs to use `s * d_a` as her "preimage" (and the payment point
> becomes the P_I Bob needs). That may depend on the exact multi-hop locks
> construction we end up using though, so I'm not 100% sure about that yet.
I was starting to think this whole thing was of marginal benefit: note
that solving "private channels need a temp scid" is far simpler[1].
But since your scheme extends to rendevous, it's much more tempting!
We would use this for normal private channels as well as private routes
aka new rendezvous. Even better, this would be a replacement for
current route hints (which lack ability to specify feature bits, which
we would add here, and is also grossly inefficient if you just want to
use it for Routeboost[2]).
Propose we take the `z` to use as bolt11 letter, because even the French
don't pronounce it in "rendez-vous"!)
Then use TLV inside:[3]
* `z` (2): `data_length` variable. One or more entries containing extra
routing information; there may be more than one `z` field. Each entry
looks like:
* `tlv_len` (8 bits)
* `rendezvous_tlv` (tlv_len bytes)
1. tlvs: `rendezvous_tlv`
2. types:
1. type: 1 (`pubkey`)
2. data:
* [`point`:`nodeid`]
1. type: 2 (`short_channel_id`)
2. data:
* [`short_channel_id`:`short_channel_id`]
1. type: 3 (`fee_base_msat`)
2. data:
* [`tu32`:`fee_base_msat`]
1. type: 4 (`fee_proportional_millionths`)
2. data:
* [`tu32`:`fee_proportional_millionths`]
1. type: 5 (`cltv_expiry_delta`)
2. data:
* [`tu16`:`cltv_expiry_delta`]
1. type: 6 (`features`)
2. data:
* [`...*byte`:`features`]
That probably adds 6 bytes entry, but worth it I think.
Cheers,
Rusty.
[1] Add a new field to 'funding_locked': "private_scid". If both sides
support 'option_private_scid' (?) then the "real" scid is no longer
valid for routing, and we use the private scid.
[2] It's enough to give the scid(s) in this case indicating where you
have incoming capacity.
[3] I'm really starting to dislike my bolt11 format. We should probably
start afresh with a TLV-based one, where signature covers the hash
of each entry (so they can be easily externalized!), but that's a
big, unrelated task.
Published at
2023-06-09 12:58:36Event JSON
{
"id": "0a8460c4a7c6022848d36e915c014601550b02523328a531c2788a348381f8a3",
"pubkey": "13bd8c1c5e3b3508a07c92598647160b11ab0deef4c452098e223e443c1ca425",
"created_at": 1686315516,
"kind": 1,
"tags": [
[
"e",
"3ed35742512a6038c8a47910d5915af4fefd8766015db6ab01e4ef19d4ac6fff",
"",
"root"
],
[
"e",
"6ae7a67c76ff6ef9b33169c902055edefb30c2afb5efc86d148955088d99dec6",
"",
"reply"
],
[
"p",
"f26569a10f83f6935797b8b53a87974fdcc1de6abd31e3b1a3a19bdaed8031cb"
]
],
"content": "📅 Original date posted:2020-02-13\n📝 Original message:\nBastien TEINTURIER \u003cbastien at acinq.fr\u003e writes:\n\u003e Hi Rusty,\n\u003e\n\u003e Thanks for the answer, and good luck with c-lightning 0.8.1-rc1 ;)\n\n... Now -rc2. I actually had a RL use for lightning (OMG!), and sure\nenough found a bug.\n\n\u003e I've been thinking more about improving my scheme to not require any sender\n\u003e change, but I don't think that's possible at the moment. As with all\n\u003e Lightning\n\u003e tricks though, once we have Schnorr then it's really easy to do.\n\u003e Alice simply needs to use `s * d_a` as her \"preimage\" (and the payment point\n\u003e becomes the P_I Bob needs). That may depend on the exact multi-hop locks\n\u003e construction we end up using though, so I'm not 100% sure about that yet.\n\nI was starting to think this whole thing was of marginal benefit: note\nthat solving \"private channels need a temp scid\" is far simpler[1].\n\nBut since your scheme extends to rendevous, it's much more tempting!\n\nWe would use this for normal private channels as well as private routes\naka new rendezvous. Even better, this would be a replacement for\ncurrent route hints (which lack ability to specify feature bits, which\nwe would add here, and is also grossly inefficient if you just want to\nuse it for Routeboost[2]).\n\nPropose we take the `z` to use as bolt11 letter, because even the French\ndon't pronounce it in \"rendez-vous\"!)\n\nThen use TLV inside:[3]\n\n* `z` (2): `data_length` variable. One or more entries containing extra\n routing information; there may be more than one `z` field. Each entry\n looks like:\n * `tlv_len` (8 bits)\n * `rendezvous_tlv` (tlv_len bytes)\n\n1. tlvs: `rendezvous_tlv`\n2. types:\n 1. type: 1 (`pubkey`)\n 2. data:\n * [`point`:`nodeid`]\n 1. type: 2 (`short_channel_id`)\n 2. data:\n * [`short_channel_id`:`short_channel_id`]\n 1. type: 3 (`fee_base_msat`)\n 2. data:\n * [`tu32`:`fee_base_msat`]\n 1. type: 4 (`fee_proportional_millionths`)\n 2. data:\n * [`tu32`:`fee_proportional_millionths`]\n 1. type: 5 (`cltv_expiry_delta`)\n 2. data:\n * [`tu16`:`cltv_expiry_delta`]\n 1. type: 6 (`features`)\n 2. data:\n * [`...*byte`:`features`]\n\nThat probably adds 6 bytes entry, but worth it I think.\n\nCheers,\nRusty.\n\n[1] Add a new field to 'funding_locked': \"private_scid\". If both sides\n support 'option_private_scid' (?) then the \"real\" scid is no longer\n valid for routing, and we use the private scid.\n\n[2] It's enough to give the scid(s) in this case indicating where you\n have incoming capacity.\n\n[3] I'm really starting to dislike my bolt11 format. We should probably\n start afresh with a TLV-based one, where signature covers the hash\n of each entry (so they can be easily externalized!), but that's a\n big, unrelated task.",
"sig": "987f3e0bb43cb3b6e561d297df94dafbf26fae4a838a379789ae9c4b879555b92fd6dd0d8a48ebffcb67487dc9e57512f1d1f52aa1aa754fd32eff1bd4c95b4c"
}