This adds support for 3 new modes to CTV:
20 Bytes HASH160 21 Bytes HASH160 + ExtraData 33 Bytes Sha256 + ExtraData
This allows LN Symmetry users to use less space and include extra data in any CSFS without enabling OP_CAT or Vectorized CSFS.
This adds support for 3 new modes to CTV:
20 Bytes HASH160 21 Bytes HASH160 + ExtraData 33 Bytes Sha256 + ExtraData
This allows LN Symmetry users to use less space and include extra data in any CSFS without enabling OP_CAT or Vectorized CSFS.
@JeremyRubin would you please add a link to the required mailing discussion (and would it make sense to append this information to the BIP119 draft instead)?
I would also be curious whether you intend this to be a separate BIP or whether it should be added to BIP-119.
It's definitely not intended to be a part of 119, it's an extension which is controversial among other options for accomplishing similar tasks (e.g. @reardencode prefers vectorcommit, CSFS multi item, or cat).
On Tue, May 14, 2024, 2:39 PM murchandamus @.***> wrote:
I would also be curious whether you intend this to be a separate BIP or whether it should be added to BIP-119.
— Reply to this email directly, view it on GitHub https://github.com/bitcoin/bips/pull/1587#issuecomment-2110875863, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGYN67QZGV2C6G7QF5KOO3ZCJK4TAVCNFSM6AAAAABHJE4DU2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMJQHA3TKOBWGM . You are receiving this because you were mentioned.Message ID: @.***>
Thanks for the further prod to comment here.
I'm a big fan of the HASH160 support as it would be appropriate for many protocols.
I'm less of a fan of the concatenation with another stack item while performing CHECKTEMPLATEVERIFY. I could be blinded by my own work and that of @stevenroose in proposing extensions to BIP119 that would use that 33rd byte (in the case of TemplateKey, compatibly with this CVT-v2, but in the case of TXHASH, conflicting with it).
35 | +value plus a few VarInts to encode sizes, and use non discounted blockspace. 36 | +Instead, committing to with CTV extra values on the stack can avoid these 37 | +overheads. 38 | + 39 | + 40 | +==Detailed Specification==
One of the things I'm having trouble following here is precisely why this extra byte allows for Extra Data to be committed to. As far as I can tell the extra byte ensures that there are at least two stack elements but doesn't actually verify what the first stack element is.
I assume that CTV's natural semantics already result in committing to the contents of that second stack element but the mechanism is not obvious to me.
this equation might help:
Sha256(CTVHASH(TX) || sha256(stack[-2])) == stack[-1][0:32]
more or less, check that the 32 bytes on the back of the stack match if you took the CTV hash and hashed it with some extra data.
The point is to enable signing stack[-1][0:32] with CSFS, which then also covers the extra data, allowing you to stuff arbitrary extra data into the witness.
Ah yes now I see it. I got lost in the noise and didn't see the -2 at the end here.
I get it now. Thanks for explaining!
0 | @@ -0,0 +1,184 @@ 1 | +<pre> 2 | + BIP: 119.2 (Pending Assignment)
BIP: 119.2 (Pending Assignment)
We only have edits to existing BIPs and new BIPs. Since this is supposed to be separate from BIP-119, it sounds like this should be:
BIP: ?
0 | @@ -0,0 +1,184 @@ 1 | +<pre> 2 | + BIP: 119.2 (Pending Assignment) 3 | + Layer: Consensus (soft fork) 4 | + Title: CHECKTEMPLATEVERIFY V2 5 | + Author: Jeremy Rubin <j@rubin.io> 6 | + Comments-URI: https://github.com/bitcoin/bips/wiki/Comments:BIP-0119 7 | + Status: Draft 8 | + Type: Standards Track 9 | + Created: 2024-05-06
This date refers to the date of number assignment.
Created: ?
5 | + Author: Jeremy Rubin <j@rubin.io> 6 | + Comments-URI: https://github.com/bitcoin/bips/wiki/Comments:BIP-0119 7 | + Status: Draft 8 | + Type: Standards Track 9 | + Created: 2024-05-06 10 | + License: BSD-3-Clause
It sounds like this BIP should either have "Replaces: 119" or "Requires: 119"
11 | +</pre> 12 | + 13 | +==Abstract== 14 | + 15 | +This BIP proposes extensions to OP_CHECKTEMPLATEVERIFY BIP-119 as enhancements 16 | +for LN Symmetry based constructions which use CTV and CSFS.
If this builds on CSFS, it would be useful to add "Requires: 348" to the header
32 | +(although, according to BIP-341/342 should not be) placed in the Annex. As CTV 33 | +does not commit to the annex, additional data can be committed to in an 34 | +OP_RETURN. However, OP_RETURNs are inefficient as they require 8 bytes of 35 | +value plus a few VarInts to encode sizes, and use non discounted blockspace. 36 | +Instead, committing to with CTV extra values on the stack can avoid these 37 | +overheads.
There seems to be a word missing in "committing to with", perhaps:
Instead, committing to the data with CTV extra values on the stack can avoid these
overheads.
Hi, I just wanted to check in and ask whether there was progress on determining whether this should be a new BIP or an amendment to BIP119. From an editorial perspective, it is currently missing a Copyright and Backwards Compatibility section, and a Rationale section could be used to collect explanations such as the one given in response to @ProofOfKeags’s question