Conversation
murchandamus
left a comment
There was a problem hiding this comment.
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. |
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. |
|
According to BIP 2:
|
|
Has this proposal been sent to the mailing list? |
Proposed to the mailing list, waiting for feedback. |
59249d9 to
dfb0670
Compare
dfb0670 to
92ffeb8
Compare
murchandamus
left a comment
There was a problem hiding this comment.
I would like to see this proposal to get more review from other covenant researchers before it moves forward.
2dfe8fd to
bbf8c49
Compare
|
It looks like we gonna have to amend the Special thanks to: @JeremyRubin @Ademan @bigspider edit: |
4df2a5d to
43259a7
Compare
acc0554 to
c49bc72
Compare
|
I think I've changed my mind a bit. We were talking about computing a merkle tree for The implication of this is that where a function can be decomposed into operations on smaller inputs, PAIRCOMMIT is massively more feasible to use than encoding things into a tap tree. |
Arithmetic and bitwise operations where inputs & outputs are small enough, can already be done in Script in cheaper ways. Merkle trees as lookup tables are only interesting for functions that are either extremely complex, or where preimages/images are larger than what Script can work with.
I think the only substantial difference is that in a Script where you need several lookups, you can do it with Merkle trees, while you can only do a single lookup with a precomputed taptree. |
Is this correct? Any suggestions? @Ademan @bigspider |
This is the main open question I believe. does it or does it not practically expand what we can already do? edit: (actually the above examples are wrong, because internally bitcoin script uses little endian, but should convey the point) |
Even u16,u16 is quite a bit larger than I think is practical as a lookup table, but the efficiency for repeated operations is constant, obviously. The lookup table is less efficient for small numbers of operations (a u8,u8 table is 16k vs 1 u8,u8 proof is 0.4k) but the merkle tree loses quickly when those operations are repeated.
Right, and the key point is these merkle trees and lookup tables rapidly become infeasible to compute as the input size grows, so multiple smaller lookups is significantly more useful. EDIT: But your point is well taken that for smaller operations they can already be better accomplished by lookup tables. |
Yeah for arbitrary 8 byte strings smolCAT seems infeasible to compute the table or merkle tree for. After a bit of conversation on IRC it could probably be feasible for arbitrary Bit shifts over 32 bit integers seems pretty feasible though, that's You can also separate positive and negative shifts, and maybe break it down into multiple rounds of shifts 1-3 or something (or 1k for a proof for a constant shift) [1]: afaik existing ASICs operate on block headers so couldn't help |
620462a to
5221a4e
Compare
bip-0442.md
Outdated
| | CTV+CSFS+IKEY | 10 WU | 48 WU | 98 WU | 1328 WU | 732 WU | CTV | | ||
| | CTV+CSFS+IKEY+PC | 11 WU | 49 WU | 131 WU | 1191 WU | 594 WU | CTV | | ||
|
|
||
| *ChannelSc: channel script, UpdateSc: update script, UpdateW: witness size for Force Close and Contest, ForceC: cost of unilateral close, Contest: additional cost to contest, Settle: signature or CTV required for settlement.* |
There was a problem hiding this comment.
If you take my suggestion from above, it’s no longer necessary to explain most column titles, and you can only explain the ones that need more description (feel free to adjust the wording, of course):
| *ChannelSc: channel script, UpdateSc: update script, UpdateW: witness size for Force Close and Contest, ForceC: cost of unilateral close, Contest: additional cost to contest, Settle: signature or CTV required for settlement.* | |
| ¹ *witness is the same weight for both Force Close and Contest in LN-Symmetry* | |
| ² *total cost of unilateral close transactions* |
There was a problem hiding this comment.
"Re-work" commit e8672fc contains changes that I find less human and approachable (parts of it feel more corporate-speak or AI-generated). I propose doing a human editing review to retain the best of before/after -- am willing to go over that with you on a call this week, if you like, or submit a diff.
Once the content is stable, it would be good to see a few experienced reviews.
|
|
||
| ### Pull Request | ||
|
|
||
| https://github.com/lnhance/bitcoin/pull/6/files |
There was a problem hiding this comment.
Why was that PR closed? Suggest providing context on the status of that PR or removing it here.
There was a problem hiding this comment.
Ahh, the PR was closed to not confuse anyone about the state of the LNhance repository.
When I restructured the changes regarding the 4 opcode package for better reviewability (script changes [consensus], policy and wallet changes, deployment changes [consensus], tests) it suddenly didn't fit anywhere, while originally it was an addition on top of the old 3 opcode LNhance branch.
murchandamus
left a comment
There was a problem hiding this comment.
This proposal has been sitting for a couple months about an hour work away from being published as Draft. Any chance you could take a stab at getting it ready to be merged?
I’m sure Jon would still be up to go over it with you as he offered above. If you’d rather address the proposed changes in a follow-up, the minimal changes necessary to get this ready for Draft could be done in a couple clicks.
There was a problem hiding this comment.
@moonsettler, @brandonblack, @jonatack: As stated above, this is essentially ready to be published except for a few minor formatting fixes and the planned small tweaks. I can make the changes to make this document BIP 3 compliant, if you prefer to address your tweaks in a follow-up PR, but I would need an indication that this is what you want.
|
Should I rebase to resolve conflicts? |
murchandamus
left a comment
There was a problem hiding this comment.
Should I rebase to resolve conflicts?
Yes please!
commit ae69991 Author: moonsettler <moonsettler@protonmail.com> Date: Tue Sep 23 02:23:43 2025 +0200 Update references commit 6adcb4e Author: moonsettler <moonsettler@protonmail.com> Date: Tue Sep 23 02:15:14 2025 +0200 General computation simplify wording commit 2f911cb Author: moonsettler <moonsettler@protonmail.com> Date: Tue Sep 23 01:36:41 2025 +0200 Rework based on feedback from PR 1699
Co-authored-by: Mark "Murch" Erhardt <murch@murch.one>
Co-authored-by: Mark "Murch" Erhardt <murch@murch.one>
Co-authored-by: Mark "Murch" Erhardt <murch@murch.one>
cff09b9 to
69f5f0f
Compare
|
@jonatack wrote:
Is this still planned? Would you be open to doing that for a follow-up PR? @moonsettler: Would I be right that there is no outstanding planned work from your side at this time? |
I somewhat sympathize with the aversions of @jonatack, but I also find find it hard to care as much as he does. I hoped to be in a better mental state by now than I was at the end of last year, but I'm still not back. Low on energy and distracted by other stuff. If Jon thinks it's important, I will defer to him on this matter and try to cooperate. |
|
I’m gonna give @jonatack a couple days to respond and revisit next week. |
OP_PAIRCOMMITis the newest member of the LNhance family of opcodes. It provides limited vector commitment functionality in tapscript.When evaluated, the
OP_PAIRCOMMITinstruction:Discussion: https://delvingbitcoin.org/t/op-paircommit-as-a-candidate-for-addition-to-lnhance/1216/12
Mail list proposal: https://groups.google.com/g/bitcoindev/c/si6ZNIkVfOw/m/29VY_YRrCgAJ