709 / 736JIT

Just-in-Time Channels

支払い到着時に初めて開かれるチャネル

Just-in-Time Channel は incoming payment に応じて LSP が初めて開く Lightning channel です。受取人は事前に capacity を買わずに受け取りを始め、opening cost は最初の payment から差し引かれます。

LSPS2、すなわち bLIP 52 は parameters を交渉し、payment data に特別な identifier を置き、LSP 通過時に private zero-confirmation channel の開設と opening fee 控除後の payment 引き渡しを起動します。

Just-in-Time Channel は public Lightning Network から LSP 経由で届く incoming payment に応じて初めて作られます。受取人は channel、outbound capacity、on-chain funds を事前に持つ必要がなく、新しい inbound liquidity の費用は最初に受け取る payment から支払います。 [1]

Client はまず lsps2.get_info を呼び、min_fee_msat、ppm の proportional rate、valid_until、min_lifetime、max_client_to_self_delay、payment size limits を持つ offers を得ます。選んだ offer と LSP が作った promise を lsps2.buy で送り、期限切れ、小さすぎる payment、liquidity 不足なら error になります。 [2]

成功した lsps2.buy は jit_channel_scid と lsp_cltv_expiry_delta を返します。Client は LSP node ID とこの SCID を BOLT11 invoice の route hint の唯一の hop に入れるか、blinded path など将来方式で同じ情報を渡します。Expiry は valid_until を超えず、payment 到着時に client は接続中でなければなりません。 [1]

LSP が incoming HTLC の jit_channel_scid を認識すると、標準 BOLT 2 channel establishment を開始します。Channel は payment_size_msat から opening_fee を引いた額と reserve を収容し、unannounced のまま option_scid_alias を使い、funding transaction の確認前でも zero-confirmation channel として payment を転送できます。 [4]

LSPS2 は二つの trust models を定義します。LSP trusts client では provider が valid funding transaction を先に公開し、client が preimage を解放しない危険を負います。Client trusts LSP では provider が broadcast を待てる一方、client は preimage を解放し valid funding outpoint の作成を信頼します。 [3]

JIT は無条件の delivery ではありません。Payment は opening fee、limits、minimum HTLC を満たす必要があり、funding_signed 前の disconnect は temporary_channel_failure になります。Naive prepayment probe は LSP trusts client で、LSP が payment を得られない channel open を起こす場合があります。 [1]

bLIP 52 は active specification で、transport として LSPS0、すなわち bLIP 50 を必要とします。Reference crate lightning-liquidity は LSPS2 の client と service handlers を提供しますが、documentation は service-side support を beta としています。API があるだけで wallet や LSP の production readiness は証明されません。 [5]

Verification は lsps2.get_info と max(min_fee_msat, proportional fee) の正確な計算、valid_until、promise、payment limits、min_lifetime、max_client_to_self_delay の確認から始まります。Payment 後は deducted fee、funding outpoint、channel parameters、channel_ready、alias、actual inbound capacity を確認し、invoice だけで open channel と判断しません。 [1]

理解を深めるには、この項目とあわせて次もお読みください Lightning Service Provider, Inbound Liquidity, Payment Channel, Price Channel, BOLT 11, BOLT 12.

01Just-in-Time Channel は無料ですか?

いいえ。LSP は最初の incoming payment から opening fee を差し引きます。Client は offer の minimum と proportional の fee、payment limits、parameters validity period を事前に確認します。

02Payment 受領前に Just-in-Time Channel は on-chain で確認済みですか?

通常は違います。LSPS2 は payment に応じて zero-confirmation channel を開き、trust model により funding transaction は mempool にあるだけか broadcast 前です。Client は許容する confirmation threshold と LSP risk を選びます。

DOC · 001bLIP 52 — LSPS2 JIT Channel Negotiation仕様 DOC · 002bLIP 50 — LSPS0 Transport Layer仕様 DOC · 003bLIP 25 — Forward less than onion value仕様 DOC · 004BOLT 2 — Peer Protocol for Channel Management仕様 DOC · 005LDK lightning-liquidity — LSPS2 module文書
改訂日: 一次資料を優先 · 投資助言ではありません