Atomic Multi-Path Paymentの概要

Atomic Multi-Path Paymentの概要

前回の記事では、なぜlightningはinvoice発信なのか。sendpaymentするにはどうするのか、を見た。 今回は、その方法であるAtomic Multi-Path Paymentのprotocolを確認する。

TL;DR

At a high level, this leverages EOBs to deliver additive shares of a base preimage, from which the payment preimages of partial payments can be derived. The
receiver can only construct this value after having received all of the
partial payments, satisfying the atomicity constraint.

部分支払いを実施するためのpreimageの可能性を広げるためextra onion blobを利用する。 受信者は、すべての部分支払いを受け取ってから初めて取得できるようになる。

Overview

下記のように、AはB、C両方のチャネルを経由してDに支払いを行う。ただし、これを部分的にではなく、一括して行うにはどうすればよいのか。

完全なpre imageを取得するまで受信者が支払いを受け取れないようにすれば良い。 Aが持っているpreimageをB、Cように分割して、Dがその両方をうけとったら復元できるようにする。

この際、Dはすべてを集めると、preimageを復活できるので、通常のlightning払いをできる。