Skip to content

Conversation

reardencode
Copy link
Contributor

@reardencode reardencode commented Jan 7, 2024

This BIP is based on the BCH OP_CHECKDATASIG work, as well as postings from the bitcoin dev mailing list in this thread. Some differences appear due to the activation of bips 340, 341, and 342 (taproot) since those were developed.

OP_CHECKSIGFROMSTACK is an OP_SUCCESS upgrade available only in BIP342 tapscript.

@reardencode reardencode force-pushed the csfs branch 3 times, most recently from b1cb659 to f6e50d1 Compare April 24, 2024 21:58
@reardencode
Copy link
Contributor Author

Updated to match the BIN, and with @Roasbeef 's comments. TYVM!

@murchandamus murchandamus added the PR Author action required Needs updates, has unaddressed review comments, or is otherwise waiting for PR author label May 8, 2024
@reardencode
Copy link
Contributor Author

Fixed preamble.

There's still 2 open conversations around this one:

  • Should it add CSFSA (after discussions in ATX with Rusty and Rob, I'm inclined to add it)
  • Should CSFSV be tapscript only (I'm inclined to add this functionality to legacy scripts as well, but may be in the minority there)

I'll post on the mailing list for additional opinions on these topics, but not sure whether it makes sense for the BIP to get numbered and merged as is while still potentially subject to those revisions.

@murchandamus
Copy link
Contributor

@reardencode: If you feel that your proposal is not ready to be merged, please convert the pull request to a Draft.

@murchandamus murchandamus marked this pull request as draft November 7, 2024 19:44
@murchandamus
Copy link
Contributor

I converted this to draft since @reardencode indicated that this would likely need more changes before being ready for number assignment and merge. Given that this hasn’t been updated in half a year, is this still in progress?

@reardencode
Copy link
Contributor Author

Definitely still WIP. Just hasn't been much reason to advance the conversation around the two specific questions I mentioned given the state of the broader conversation around bitcoin's future consensus changes.

I am a bit confused about the need to have those questions answered before merging. Is the intention of the BIPs repository only to hold final specifications for consensus changes, or to enable iterating on consensus changes before proposing a document for numbering and merging?

@jonatack
Copy link
Member

jonatack commented Nov 8, 2024

@reardencode per your question in #1535 (comment) and above, the current process is that of BIP 2. Iteration while in Draft status seems to be expected, but a BIP may only change status from Draft to Proposed when the author deems it is complete. An incomplete and unofficial simplified requirement list might be: (for number assignment) dev ML discussion, is high-quality, technically sound and complete, keeps with Bitcoin philosophy, well-scoped, has motivation, accurate title, addresses backwards compatibility, no BIP number conflicts, and (for draft merge): preamble, acceptable copyright, complete header (with status and type, correct layer if provided).

@murchandamus
Copy link
Contributor

I am a bit confused about the need to have those questions answered before merging. Is the intention of the BIPs repository only to hold final specifications for consensus changes, or to enable iterating on consensus changes before proposing a document for numbering and merging?

You had written above

I'll post on the mailing list for additional opinions on these topics, but not sure whether it makes sense for the BIP to get numbered and merged as is while still potentially subject to those revisions.

which I interpreted as a request to hold off while the situation might still be developing. I take it that I misunderstood you?

@reardencode
Copy link
Contributor Author

which I interpreted as a request to hold off while the situation might still be developing. I take it that I misunderstood you?

Gotcha. Yeah, I honestly just don't know whether it makes sense to number and merge the BIP with outstanding questions like those or not. Since we're back in motion LNHANCE, I'll follow through and see what opinions appear :)

Thanks!

@murchandamus
Copy link
Contributor

@reardencode: Preferably, as much as possible of the proposal is in place before it is put forth for an Editor review. Open questions tend to signal that a BIP may still be developing directionally and editors may be holding off due to that. ;)

If the open questions concern minor details, or have been resolved, please let us know that it is ready for an editor review.

@reardencode reardencode force-pushed the csfs branch 2 times, most recently from 9df2dbc to 5645ecd Compare November 26, 2024 06:38
@moonsettler
Copy link

Can we change the name of this PR and remove (VERIFY) to more accurately reflect the latest state of the proposal?

@reardencode reardencode changed the title Add bip-csfs OP_CHECKSIGFROMSTACK(VERIFY) Add bip-csfs OP_CHECKSIGFROMSTACK Nov 26, 2024
@reardencode
Copy link
Contributor Author

Updated with an additional example, removed CSFSV, and all earlier review comments addressed.

@reardencode reardencode marked this pull request as ready for review November 26, 2024 15:18
Copy link
Contributor

@murchandamus murchandamus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let’s call this BIP 348.

@murchandamus murchandamus changed the title Add bip-csfs OP_CHECKSIGFROMSTACK BIP 348: OP_CHECKSIGFROMSTACK Nov 26, 2024
@reardencode reardencode force-pushed the csfs branch 2 times, most recently from 320b3b8 to 7676dda Compare November 26, 2024 18:55
@reardencode reardencode force-pushed the csfs branch 5 times, most recently from b37d316 to ce09486 Compare November 26, 2024 19:23
@reardencode
Copy link
Contributor Author

I believe I've addressed your comments. Thanks much!

Would love you to read over the new text I added in the Lightning Symmetry section.

@murchandamus
Copy link
Contributor

murchandamus commented Nov 26, 2024

Would love you to read over the new text I added in the Lightning Symmetry section.

LGTM

Nit: In the future, if you don’t reposition all the linebreaks, it’s much easier to see what was changed in text. 🤓

I.e. it’s harder to discern what all the changes are in

-`OP_CHECKSIGFROMSTACK` (CSFS) can be used in Lightning Symmetry channels.
-The construction `OP_CHECKTEMPLATEVERIFY <pubkey> OP_CHECKSIGFROMSTACK` with a
-spend stack containing the CTV hash and a signature for it is logically
-equivalent to `<bip118_pubkey> OP_CHECKSIG` and a signature over
-`SIGHASH_ALL|SIGHASH_ANYPREVOUTANYSCRIPT`. The `OP_CHECKSIGFROMSTACK`
-construction is 8 vBytes larger.
+`OP_CHECKSIGFROMSTACK` (CSFS) can be used to implement Lightning Symmetry
+channels. The construction `OP_CHECKTEMPLATEVERIFY <pubkey>
+OP_CHECKSIGFROMSTACK` with a spend stack containing the CTV hash and a
+signature for it is logically equivalent to `<bip118_pubkey> OP_CHECKSIG` and
+a signature over `SIGHASH_ALL|SIGHASH_ANYPREVOUTANYSCRIPT`. The
+`OP_CHECKSIGFROMSTACK` construction is 8 vBytes larger.

than in

-`OP_CHECKSIGFROMSTACK` (CSFS) can be used in Lightning Symmetry channels.
+`OP_CHECKSIGFROMSTACK` (CSFS) can be used to implement Lightning Symmetry channels.

@reardencode
Copy link
Contributor Author

@murchandamus I believe moon and a couple others will take a look today, then I think this is G2G.

Copy link

@moonsettler moonsettler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK on the current content.

Might want to consider mentioning the deleted key function verification scheme we learned from @bigspider?

edit:
Will add to PAIRCOMMIT instead! Since it needs multiple elements signed to work.

Copy link
Contributor

@murchandamus murchandamus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I’m not sure whether you were still waiting for the other couple reviewers, but they can also take a look when it is a merged draft. The Rationale seems a bit concise, I would like to suggest that relevant questions and comments may still be added to this as they are brought up per coming review.

Gonna merge this now, if you want to make further changes, please open another pull request.

@murchandamus murchandamus merged commit c7abd91 into bitcoin:master Dec 6, 2024
4 checks passed
@murchandamus murchandamus removed the PR Author action required Needs updates, has unaddressed review comments, or is otherwise waiting for PR author label Dec 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants