-
Notifications
You must be signed in to change notification settings - Fork 5.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OP_PAIRCOMMIT #1699
base: master
Are you sure you want to change the base?
OP_PAIRCOMMIT #1699
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This document has a few formatting issues, please make sure that the preamble matches the BIP 2 requirements and take a look at the rich diff to see whether it looks the way you intend.
Please note that the BIPs repository also accepts markdown files.
Switched back to markdown. Header now in BIP-2 format. |
73dab62
to
8f11758
Compare
8f11758
to
f3f7f91
Compare
The original create date of OP_PAIRCOMMIT is 2024-03-15 this is the latest revision based on feedback from Anthony Towns. |
Added a discussion link to the PR description.
Perhaps add a changelog with the revision based on Anthony Towns' feedback followed by the initial version. Or use the date of the current draft revision as your starting point. |
According to BIP 2:
|
Has this proposal been sent to the mailing list? |
Proposed to the mailing list, waiting for feedback. |
bip-PC.md
Outdated
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It sounds like OP_PAIRCOMMIT is closely related to CAT and CSFS. Could you perhaps expand on the related work and design decisions in a Rationale section?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alternatives we discussed:
- OP_CAT
- Merkle operation opcodes
- SHA256 streaming opcodes
- 'Kitty' CAT (result or inputs limited in size to try disable introspection and arithmetic extension uses)
- OP_CTV also commiting to the taproot annex in tapscript
- OP_CHECKSIGFROMSTACK variant on n elements as message instead of 1
- OP_VECTORCOMMIT (decoupling above behavior)
Finally after weighing everything OP_PAIRCOMMIT was the simplest addition that got what we needed exactly in the most efficient way. It's a minimal code change, very easy to reason about. Therefore we expect it to be the least controversial option.
Sadly a lot of the discussion is all over the place and on unsearchable mediums.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That’s why I am suggesting that this proposal should collect some of that information.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefer to keep it simple and to the point. Added a more brief rationale section. Could do a more in depth recollection on what we learned and why certain alternatives fell out of favor on a delving thread we link from here, if people are actually curious.
Remove style, Correct title
3cbad32
to
59249d9
Compare
59249d9
to
dfb0670
Compare
OP_PAIRCOMMIT
is the newest member of the LNhance family of opcodes. It provides limited vector commitment functionality in tapscript.When evaluated, the
OP_PAIRCOMMIT
instruction:Discussion: https://delvingbitcoin.org/t/op-paircommit-as-a-candidate-for-addition-to-lnhance/1216/12