eltoo
LN は off chain で channel の state を更新していく。
しかし最新の state を blockchain に必ず反映させる仕組みはない。
そのため古い state を使おうとした場合は punishment として全額相手に取られてしまう仕組みで、そのような行為を牽制する。
eltoo(LN symmetry) では、最新の state だけが有効な状態をつくりだす。
State を確定させる Settlement Tx と、State を更新する Update Tx を使い分ける。
Funding Tx および Update Tx の Output は、Timelock 付きで Settlement Tx が消費する場合と、即座に Update Tx が消費する2パターンにより消費できる。
古い Settlement Tx がブロードキャストされた場合、timelock があるため、timelock が解ける前に最新の Update Tx を使って先に Output を使ってしまうことができる。その後、その Update Tx を最新の Settlement Tx で消費すれば最新の state 通りに分配される。
3. On-chain update protocol
lock into multisig
create settlement (commitment) transaction
refund tx でもある
output of funding tx have if statement
OP_CSV で valid になるまでの timeout を設定する settelement tx 用 settelement tx は timeout しないと実行できない
else
update tx
The use of different key-pairs prevents an attacker from simply swapping out the branch selection and reusing the same signatures for the other branch.
3.2 Negotiation and Settlement phase
OP_CSV でロックされた settlement 用の output が有効になるまでは、update tx をつくって state を更新する
新しい state を反映する settlement tx をつくる
このタイミングでまた新たな csv のロックを設定できる
update tx は funding tx か前の update tx の output を消費し、prev tx と同じ output script
なぜ?
これは csv でロックされている settlement tx を doublespend する形になる
つまり前の settlement tx は csv のロックが開けても、もう消費できない
funding tx と settelement tx がペアであるように、update tx と settlement tx もペア
eltoo が解決しようとしている問題は、すでに有効である settlement tx を無効にすること
settlement tx の input になる output を update tx で先に unlock してしまうことで、settlement tx がその output を使えないようにする
4. Lifting the protocol off the chain
任意の update tx の input に任意の output を使うことができれば、すべての update tx を blockchain に commit する必要はない
sighash noinput
いまはまだない
最初の fundting tx だけでよいことになる
ただしそのままでは、古い tx が新しい tx を spend できる
update tx をスペンドするには 現在プラス 1以上のnlooktimeが必要
S は現在のステート
nLockTime に指定されている
However, the nLocktime field is already being used to invalidate transactions until some time.
nLockTime は状況によっていろいろな意味を持つので注意が必要
現時点では1billion以上の値が過去の値として使える=OP_CLTVで検証しても valid になる
これらの分だけ eltoo のステート管理の目的で使うことができる
この nlocktime の使い方はもう少し改善できるのではないか、という話。全然理解できていない、、、
settlement tx は特定の update tx しか input にできないようにしたいので、key pair を毎回変える
これはでかい
Resource