Skip to content

Conversation

@EthanHeilman
Copy link
Contributor

This BIP defines OP_CAT a new tapscript opcode which allows the concatenation of two values on the stack. This opcode would be activated via a soft fork by redefining the opcode OP_SUCCESS126.

See our implementation PR in bitcoin-inquisition: bitcoin-inquisition/bitcoin#39

Copy link
Contributor

@kallewoof kallewoof left a comment

Choose a reason for hiding this comment

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

Some minor nits. Idea seems sensible. Mailing list post seems mostly positive sentiment as well.

@luke-jr ?

EthanHeilman and others added 4 commits December 12, 2023 08:24
Co-authored-by: kallewoof <[email protected]>
"If an if only has a single-statement then-clause, it can appear on the same line as the if, without braces. In every other case, braces are required, and the then and else clauses must appear correctly indented on a new line."

Co-authored-by: kallewoof <[email protected]>
Co-authored-by: kallewoof <[email protected]>
Co-authored-by: kallewoof <[email protected]>
@Bloc6
Copy link

Bloc6 commented Dec 12, 2023

Definitely looking forward to test drive this BIP.

@EthanHeilman
Copy link
Contributor Author

Can we get a BIP number assigned? Any blockers to doing this?

Copy link
Contributor

@kallewoof kallewoof left a comment

Choose a reason for hiding this comment

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

Sorry, some more μ-nits. Fine with it as is though.

EthanHeilman and others added 8 commits December 14, 2023 23:43
Co-authored-by: kallewoof <[email protected]>
Co-authored-by: kallewoof <[email protected]>
Co-authored-by: kallewoof <[email protected]>
Co-authored-by: kallewoof <[email protected]>
Co-authored-by: kallewoof <[email protected]>
Co-authored-by: kallewoof <[email protected]>
TIL that it is "a one" rather than "an one"

Co-authored-by: kallewoof <[email protected]>

* Bitstream, a protocol for the atomic swap (fair exchange) of bitcoins for decryption keys, that enables decentralized file hosting systems paid in Bitcoin. While such swaps are currently possible on Bitcoin without OP_CAT they require the use of complex and computationally expensive Verifiable Computation cryptographic techniques. OP_CAT would remove this requirement on Verifiable Computation, making such protocols far more practical to build in Bitcoin. <ref>R. Linus, "BitStream: Decentralized File Hosting Incentivised via Bitcoin Payments", 2023, https://robinlinus.com/bitstream.pdf</ref>
* Tree Signatures provide a multisignature script whose size can be logarithmic in the number of public keys and can encode spend conditions beyond n-of-m. For instance a transaction less than 1KB in size could support tree signatures with a thousand public keys. This also enables generalized logical spend conditions. <ref> P. Wuille, "Multisig on steroids using tree signatures", 2015, https://blog.blockstream.com/en-treesignatures/</ref>
* Post-Quantum Lamport Signatures in Bitcoin transactions. Lamport signatures merely require the ability to hash and concatenate values on the stack. <ref>J. Rubin, "[bitcoin-dev] OP_CAT Makes Bitcoin Quantum Secure [was CheckSigFromStack for Arithmetic Values]", 2021, https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2021-July/019233.html</ref>
Copy link
Contributor

Choose a reason for hiding this comment

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

Lamport signatures in tapscript aren't actually quantum secure because the taptweak still relies on EC operations.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

As far as I know it is an open question if the taptweak based commitment is quantum secure or not. This BIP could not take a position on this question. I will reword this to fix any confusion.

Copy link
Contributor

Choose a reason for hiding this comment

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

You're right, I spoke too soon.

Copy link
Contributor Author

@EthanHeilman EthanHeilman Dec 16, 2023

Choose a reason for hiding this comment

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

I'm glad you brought this up. I wouldn't want the BIP to be seen as making an authoritative statement on this question. Let me know if you think my change addresses the issue or not.

EthanHeilman and others added 4 commits December 15, 2023 09:54
Co-authored-by: Vojtěch Strnad <[email protected]>
Co-authored-by: Vojtěch Strnad <[email protected]>
Co-authored-by: Vojtěch Strnad <[email protected]>
Co-authored-by: Vojtěch Strnad <[email protected]>
EthanHeilman and others added 4 commits December 15, 2023 15:46
Co-authored-by: Vojtěch Strnad <[email protected]>
Co-authored-by: Vojtěch Strnad <[email protected]>
Co-authored-by: Vojtěch Strnad <[email protected]>
Copy link
Member

@jonatack jonatack left a comment

Choose a reason for hiding this comment

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

ACK 7ad0f82

@JackNickholson
Copy link

Hi!

No spam intended. As a layman, the comments on this merged commit sound scary:
https://bitcoinmagazine.com/glossary/bitcoin-covenants-op_cat-bip-347

In simple terms, what would the comments of the contributors on this article?
Did the merge end up to the mainnet ?
Were there any side effects observed?

@jonatack
Copy link
Member

jonatack commented May 3, 2025

@JackNickholson

comments of the contributors

Mail list discussions here:

https://groups.google.com/g/bitcoindev/search?q=OP_CAT

https://groups.google.com/g/bitcoindev/c/cWSU3yaDdhM/m/dkz9DAT7AAAJ

Did the merge end up to the mainnet ?

Pull request here (draft, unmerged):

bitcoin/bitcoin#29247

@apexspyche

This comment was marked as spam.

@apexspyche

This comment was marked as spam.

@apexspyche

This comment was marked as spam.

@apexspyche

This comment was marked as spam.

@bitcoin bitcoin deleted a comment from apexspyche May 3, 2025
@bitcoin bitcoin deleted a comment from apexspyche May 3, 2025
@bitcoin bitcoin deleted a comment from apexspyche May 3, 2025
@bitcoin bitcoin deleted a comment from apexspyche May 3, 2025
@bitcoin bitcoin deleted a comment from apexspyche May 3, 2025
@bitcoin bitcoin deleted a comment from apexspyche May 3, 2025
@bitcoin bitcoin deleted a comment from apexspyche May 3, 2025
@bitcoin bitcoin deleted a comment from apexspyche May 3, 2025
@bitcoin bitcoin deleted a comment from apexspyche May 3, 2025
@bitcoin bitcoin deleted a comment from apexspyche May 3, 2025
@bitcoin bitcoin deleted a comment from apexspyche May 3, 2025
@bitcoin bitcoin deleted a comment from apexspyche May 3, 2025
@bitcoin bitcoin deleted a comment from apexspyche May 3, 2025
@bitcoin bitcoin deleted a comment from apexspyche May 3, 2025
@bitcoin bitcoin deleted a comment from apexspyche May 3, 2025
@bitcoin bitcoin deleted a comment from apexspyche May 3, 2025
@bitcoin bitcoin deleted a comment from apexspyche May 3, 2025
@bitcoin bitcoin deleted a comment from apexspyche May 3, 2025
@bitcoin bitcoin deleted a comment from apexspyche May 3, 2025
@bitcoin bitcoin deleted a comment from apexspyche May 3, 2025
@bitcoin bitcoin deleted a comment from apexspyche May 3, 2025
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.