LN Onion messaging
BOLT4 に新しく追加されたメッセージングのための spec
bolts/04-onion-routing.md at master · lightning/bolts
Rusty の PR
BOLT 7: Onion message support (features 38/39) by rustyrussell · Pull Request #759 · lightning/bolts
rusty のブランチ
rustyrussell/lightning-rfc at onion-messages
Onion message uses Route Blinding. So onion_message_packet contains encrypted_recipient_data.
Route Blinding describe more about encrypted_recipient_data, but generaly, if a node got encrypted_recipient_data, decrypt it and process data.
onion_message という新しいメッセージが定義される
onion_message_packet が入っているが、これは通常の秘密鍵で decrypt できるわけではないらしい
update_add_htlc に onion_routing_packet があるが、これとほぼ同じと思ってよいだろう。update_add_htlc は onion_routing_packet を使ってメッセージを送ると比較して、 onion_message は onion_message_packet を使ってより柔軟なメッセージングを実現するイメージか?
onion_message_packet に onionmsg_payloads が入っていて、payload の中身は encrypted_recipient_data
中間ノードの場合は、暗号化されたデータ。これを次のノードに渡すんだと思う
最終ノードの場合は reply path などが入っている
データ型 encrypted_recipient_data は、Route Blinding で定義されている encrypted_data_tlv にしたがうものである
つまり onion message は route blinding の spec に則りルーティングされる
Onion routing との違い
reply_path
route blind
Onion Messaging In Depth. Feedback from Matt Corallo recently… | by Rusty Russell | Medium
Onion messages | Bitcoin Optech
Onion Messages Demystified | Lightning Dev Kit Documentation
もともと LN Onion Routing というマルチ hop 間でメッセージをルーティングする仕組みがある
bolts/04-onion-routing.md at master · lightning/bolts · GitHub
その中の一つの type として onion message を新しく定義する?
replay path によって双方向通信ができるのが特徴なのか?
LND
LDK を使って別のプロセスとして実行する方向で進めるらしい
詳細は BOLT12 に記載
受信者の匿名性を向上させるルートブラインディング | Yuya | Spotlight
現在、ライトニング上でメッセージを送信する場合は、HTLCを使った送金データにメッセージを付与させて行うことができる。
Is onion messaging spam tolerant?
Lightning-dev A Proposal for Adding Bandwidth Metered Payment to Onion Messages by Olaoluwa Osuntokun
https://github.com/lightningnetwork/lnd/issues/5594#issuecomment-1042314431
Sending onion_message using HTLCs · lightning/bolts · Discussion #1196
What about LN probing? Is it already kind of spam?
Some devs think rate-limiting is enough
Lightning-dev Onion messages rate-limiting