BIP62 and future script upgrades



Summary:

A discussion has been initiated regarding the "clean stack" requirement in BIP62, which disallows passing more inputs to a script than necessary. However, an exception is needed for P2SH scripts as the test can only be done after the second stage evaluation and rejecting all spends from P2SH would lead to complications. A pull request has been submitted to clarify this issue in BIP62. Additionally, it has been noted that the clean-stack rule is incompatible with future P2SH-like constructs which could be useful for deploying "Script 2.0". Any upgrade to such a system would require an exception in the clean-stack rule, which when deployed, is no longer a softfork.Luke has suggested not applying this rule on every transaction with nVersion >= 3, which solves the problem. This solution can be generalized to apply only to transactions with strict nVersion == 3, while the higher versions are non-standard and should not be used until there is a rule that applies to them. Opinions have been requested on this matter.


Updated on: 2023-05-19T19:27:27.548526+00:00