Published on: 2017-01-05T16:22:34+00:00
The bitcoin-dev mailing list is currently engaged in a discussion regarding the controversial opcode OP_CAT. Some members are advocating for a direct limit on OP_CAT, while others prefer a general memory limit. Previously, OP_CAT had a limit of 5000 bytes, but it was disabled by Satoshi on August 15, 2010, and replaced with a limit of 520 bytes. There are concerns that enabling OP_CAT could potentially enable covenants, but some argue that a script with a large number of OP_2DUPs would be more concerning. The MAX_SCRIPT_ELEMENT_SIZE is set at 520 bytes, so the worst-case scenario for a script using OP_CAT would be around 10 MB. The discussion also delves into the memory usage cost of each instruction and the need to reasonably bound it. While there is debate about implementing a general memory limit, some participants argue that it is challenging to create a non-implementation dependent memory limit. The group is striving to find the best approach to prevent future memory-risky opcodes from causing issues.On January 2, 2017, a user named Steve Davis posted a question on the bitcoin-dev mailing list regarding a potential attack vector involving a specific pk_script. Jeremy Rubin responded, stating that the script would not pose a significant threat and the worst it could do is consume approximately 10 MB of memory. Johnson Lau added that a script can only contain up to 201 opcodes, and the maximum size for OP_CAT is set at 520 bytes. On January 3, 2017, Rubin reiterated his view that the elements alpha proposal to reintroduce a limited OP_CAT to 520 bytes sparked controversy. Russell O'Connor further clarified that Satoshi had implemented the OP_CAT limit of 520 bytes on August 15, 2010, when disabling OP_CAT, as the previous limit was 5000 bytes.In summary, the bitcoin-dev mailing list is currently engaged in a discussion about the opcode OP_CAT. The debate revolves around implementing a direct limit or a general memory limit for OP_CAT. Concerns exist regarding the potential enabling of covenants if OP_CAT is enabled. However, some argue that a script with numerous OP_2DUPs poses a more significant concern. The MAX_SCRIPT_ELEMENT_SIZE is set at 520 bytes, limiting the worst-case scenario to approximately 10 MB for a script utilizing OP_CAT. The discussion also touches on the memory usage cost of each instruction and the challenges of establishing a non-implementation dependent memory limit. On January 2, 2017, a user raised a question about a potential attack vector involving a specific pk_script, which Jeremy Rubin and Johnson Lau responded to. Rubin mentioned the controversy surrounding the elements alpha proposal to reintroduce a limited OP_CAT to 520 bytes, while Russell O'Connor clarified Satoshi's implementation of the 520-byte limit when disabling OP_CAT on August 15, 2010.
Updated on: 2023-08-01T19:22:42.597136+00:00