diff --git a/bip-PC.md b/bip-PC.md index 46d39236b..4ec7e133a 100644 --- a/bip-PC.md +++ b/bip-PC.md @@ -32,12 +32,6 @@ Using in sequence `OP_CHECKTEMPLATEVERIFY`, `OP_PAIRCOMMIT`, `OP_INTERNALKEY` and `OP_CHECKSIGFROMSTACK` we can construct a rebindable channel that is also optimal. -If `OP_CAT` was available, it could be used to combine multiple stack elements, -that get verified with `OP_CHECKSIGFROMSTACK` as a valid state update. - -`OP_PAIRCOMMIT` solves this specific problem without introducing a wide range -of potentially controversial new behaviors, such as novel 2-way peg mechanisms. - The number of SHA256 iterations is minimized in the primary use case we can optimize for, which is LN-Symmetry. Since the Tag can be pre-computed as 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: https://github.com/lnhance/bitcoin/pull/6/files +## Rationale + +If `OP_CAT` was available, it could be used to combine multiple stack elements, +that get verified with `OP_CHECKSIGFROMSTACK` as a valid state update. + +`OP_PAIRCOMMIT` solves this specific problem without introducing a wide range +of potentially controversial new behaviors, such as novel 2-way peg mechanisms. + +### Behaviours LNhance tries to avoid introducing + +The following behaviors are out of scope for LNhance and should not be enabled +as a side effect without explicit consensus: + +* Fine grained introspection +* State carrying covenants +* Bigint operations +* New arithmetic capabilities using lookup tables + +### Alternative approaches + +The following list of alternative approaches were discussed and rejected for +various reasons, either for expanding the scope or for unnecesary complexity: + +* OP_CAT +* SHA256 streaming opcodes +* Merkle operation opcodes +* 'Kitty' CAT: result or inputs arbitrarily limited in size +* OP_CHECKTEMPLATEVERIFY committing to the taproot annex in tapscript +* OP_CHECKSIGFROMSTACK on n elements as message +* OP_VECTORCOMMIT: + ## Backward Compatibility By constraining the behavior of OP_SUCCESS opcodes, deployment of the BIP