Skip to content

Commit dfb0670

Browse files
committed
Add: Rationale section
1 parent 40f0b0f commit dfb0670

File tree

1 file changed

+31
-6
lines changed

1 file changed

+31
-6
lines changed

bip-PC.md

Lines changed: 31 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,6 @@ Using in sequence `OP_CHECKTEMPLATEVERIFY`, `OP_PAIRCOMMIT`, `OP_INTERNALKEY`
3232
and `OP_CHECKSIGFROMSTACK` we can construct a rebindable channel that is also
3333
optimal.
3434

35-
If `OP_CAT` was available, it could be used to combine multiple stack elements,
36-
that get verified with `OP_CHECKSIGFROMSTACK` as a valid state update.
37-
38-
`OP_PAIRCOMMIT` solves this specific problem without introducing a wide range
39-
of potentially controversial new behaviors, such as novel 2-way peg mechanisms.
40-
4135
The number of SHA256 iterations is minimized in the primary use case we
4236
can optimize for, which is LN-Symmetry. Since the Tag can be pre-computed as
4337
mid-state, it would only take 1 or 2 hash cycles in validation for the
@@ -132,6 +126,37 @@ A reference implementation is provided here:
132126

133127
https://github.com/lnhance/bitcoin/pull/6/files
134128

129+
## Rationale
130+
131+
If `OP_CAT` was available, it could be used to combine multiple stack elements,
132+
that get verified with `OP_CHECKSIGFROMSTACK` as a valid state update.
133+
134+
`OP_PAIRCOMMIT` solves this specific problem without introducing a wide range
135+
of potentially controversial new behaviors, such as novel 2-way peg mechanisms.
136+
137+
### Behaviours LNhance tries to avoid introducing
138+
139+
The following behaviors are out of scope for LNhance and should not be enabled
140+
as a side effect without explicit consensus:
141+
142+
* Fine grained introspection
143+
* State carrying covenants
144+
* Bigint operations
145+
* New arithmetic capabilities using lookup tables
146+
147+
### Alternative approaches
148+
149+
The following list of alternative approaches were discussed and rejected for
150+
various reasons, either for expanding the scope or for unnecessary complexity:
151+
152+
* OP_CAT
153+
* SHA256 streaming opcodes
154+
* Merkle operation opcodes
155+
* 'Kitty' CAT: result or inputs arbitrarily limited in size
156+
* OP_CHECKTEMPLATEVERIFY committing to the taproot annex in tapscript
157+
* OP_CHECKSIGFROMSTACK on n elements as message
158+
* OP_VECTORCOMMIT:
159+
135160
## Backward Compatibility
136161

137162
By constraining the behavior of OP_SUCCESS opcodes, deployment of the BIP

0 commit comments

Comments
 (0)