From f7bd2e699b7503c89c9014803decc942487ca272 Mon Sep 17 00:00:00 2001 From: moonsettler Date: Mon, 23 Dec 2024 17:43:02 +0100 Subject: [PATCH] Update Cost comparison table --- bip-0442.md | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/bip-0442.md b/bip-0442.md index f20d167468..65401eaf28 100644 --- a/bip-0442.md +++ b/bip-0442.md @@ -147,8 +147,8 @@ using `OP_PAIRCOMMIT`. One way to think about the 3 opcodes (`OP_CHECKSIGFROMSTACK`, `OP_INTERNALKEY`, `OP_PAIRCOMMIT`) is we decompose a `OP_CHECKSIGFROMSTACK` variant that can use -a 1-byte `OP_TRUE` public key (substituting for the *taproot internal key*) and can -commit to a number of stack elements as a message. +a 1-byte `OP_TRUE` public key (substituting for the *taproot internal key*) and +can commit to a number of stack elements as a message. ### Behaviors LNhance tries to avoid introducing @@ -175,18 +175,21 @@ various reasons, either for expanding the scope or for unnecessary complexity: ### Cost comparison of LN-Symmetry constructions -| Method | ChannelS | UpdateSc | UpdateWi | 1-Update | 2-Update | -| :------------ | -------: | -------: | -------: | --------: | --------: | -| APO-annex | 2.25 vB | 28.25 vB | 25 vB | 305 vB | 461.5 vB | -| APO-return | 2.25 vB | 28.25 vB | 16.5 vB | 338.5 vB | 528.5 vB | -| CTV+CSFS+IKEY | 2.75 vB | 12.25 vB | 24.5 vB | 331 vB | 513 vB | -| CTV+CSFS | 11 vB | 20.5 vB | 24.5 vB | 347.5 vB | 537.75 vB | -| LNhance | 3 vB | 12.5 vB | 32.75 vB | 297.75 vB | 446.25 vB | -| rekey | 7.25 vB | 16.75 vB | 73.75 vB | 347.25 vB | 541 vB | +| Method | ChannelSc | UpdateSc | UpdateW | ForceC | Contest | Settle | +| :------------ | --------: | -------: | ------: | ------: | ------: | :----: | +| APO-Annex | 8 WU | 113 WU | 100 WU | 1221 WU | 627 WU | SigOp | +| APO-Return | 8 WU | 113 WU | 66 WU | 1359 WU | 765 WU | SigOp | +| CTV+CSFS+IKEY | 10 WU | 48 WU | 98 WU | 1328 WU | 732 WU | CTV | +| CTV+CSFS | 43 WU | 81 WU | 98 WU | 1394 WU | 765 WU | CTV | +| LNhance | 11 WU | 49 WU | 131 WU | 1191 WU | 594 WU | CTV | + +*ChannelSc: channel script, UpdateSc: update script, UpdateW: witness is the +same size for both Force Close and Contest in LN-Symmetry, Return: utilizes +`OP_RETURN`, ForceC: total cost of unilateral close transactions* ### Proving general computation -Merkle trees can be used to prove out computation where the root of the tree +Merkle trees can be used to prove computation where the root of the tree represents the *function* and the leaves represent the *inputs* and *output*. There are practical limits to the entropy space for the *inputs* as they need to be iterated over and hashed into a merkle root.