Skip to content

Commit

Permalink
Update: Cost comparison table
Browse files Browse the repository at this point in the history
  • Loading branch information
moonsettler committed Dec 23, 2024
1 parent 41b168b commit 0253838
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions bip-0442.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -175,18 +175,20 @@ 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, 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.
Expand Down

0 comments on commit 0253838

Please sign in to comment.