Unlimited covenants, was Re: CHECKSIGFROMSTACK/{Verify} BIP for Bitcoin



Summary:

The discussion on enabling covenants in Bitcoin Script is ongoing, with some concerns about the potential risks and benefits. While some argue that enabling covenants can be helpful, others are worried about unduly burdening nodes with transaction and block validation. However, there is no need to ban Turing completeness for the sake of banning it, as long as validation costs remain bounded. The goal is to keep script execution as a pure function of transaction data and ensure that nodes do not need to reevaluate their mempool on every new block. Additionally, simple primitive operations with clear and precise semantics are preferred for consensus purposes. Although covenant-enabled computations could allow users to put their funds at risk through weird machines that manipulate their money on the blockchain, this is already a concern today. Covenant-enabled computations that span across multiple transactions or some kind of STARK or SNARK tapleaf version that succinctly represents arbitrary computations could be allowed, as long as validation costs remain bounded. It may be possible to encode an upper bound on the number of recursions to prevent full Turing-completeness while allowing for a large number of use cases.There are concerns from some members of the community about the potential risks of covenants, but these concerns can be addressed by showing that they are unfounded or less severe than originally thought. While recursive covenants could lead to problems, such as those seen with altcoins, limiting Bitcoin's flexibility to avoid these problems is unnecessary. Increased functionality does imply increased processing, but computation devices are becoming cheaper, making this less of a concern.An "inescapable" covenant that requires the output to be paid to the same covenant is essentially a Turing machine and equivalent to a `while (true);` loop. Although more functionality can be added on top of that loop, such unbounded infinite loops are only possible under Turing machines. Nonetheless, codata processing allows for unbounded loops without requiring full Turing-completeness. It may be possible to encode an upper bound on the number of recursions, which prevents full Turing-completeness while allowing for a large number of use-cases.


Updated on: 2023-06-15T00:04:18.802960+00:00