Script Abuse Potential?



Summary:

The bitcoin-dev mailing list is discussing the controversial opcode OP_CAT. Some members are in favor of implementing a direct limit on OP_CAT, while others prefer a general memory limit. The previous limit for OP_CAT was 5000 bytes, but Satoshi disabled it and added a limit of 520 bytes on August 15, 2010. There are concerns that enabling OP_CAT could potentially enable covenants. However, it is noted that a script with a large number of OP_2DUPs would be more concerning. The MAX_SCRIPT_ELEMENT_SIZE is 520 bytes, so the worst that could be done with a script using this opcode would be around 10 MB. The discussion also touches on the memory usage cost of each instruction and the need to reasonably bound it. The chief argument against a general memory limit is that it is tricky to make a non-implementation dependent memory limit, though this is not seen as a strong argument. Overall, the group is considering the best approach to ensure future memory-risky opcodes do not cause issues.


Updated on: 2023-06-11T21:02:20.731040+00:00