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



Summary:

In a recent discussion on the bitcoin-dev mailing list, Jeremy noted that the broader community is unconvinced by the cost benefit of arbitrary covenants. However, Dave believes that arbitrary covenants should not be prohibited for the sake of banning Turing completeness. He emphasized that transaction and block validation should not be unduly burdensome for nodes, and suggested bounding the resources needed to execute Bitcoin Script as a linear function of weight. Additionally, he argued for simple primitive operations with clear and precise semantics that are easy to parse and avoid security vulnerabilities within node software. Although these design constraints imply a prohibition on Turing complete computation within a single Script, they do not prohibit arbitrary, covenant-enabled computations that span across multiple transactions. Further, Dave suggested that some kind of STARK or SNARK tapleaf version could represent arbitrary computations succinctly, so long as validation costs remain bounded. While this could potentially allow users to put their funds at risk through weird machines that manipulate their money on the blockchain, Dave argued that keeping Script simple and maintaining an understanding that Script programs are untrusted inputs can keep potential weirdness at bay. ZmnSCPxj agreed with Dave's argument, noting that respecting the concerns of others doesn't require lobotomizing useful tools. He argued that being respectful can also be accomplished by politely showing that their concerns are unfounded. ZmnSCPxj also stated that inescapable covenants are basically Turing machines and equivalent to a `while (true);` loop, which allows unbounded infinite loops. However, he suggested that codata processing does allow for unbounded loops without requiring full Turing-completeness and proposed that covenants could encode an upper bound on the number of recursions to prevent full Turing-completeness while allowing for a large number of use-cases.


Updated on: 2023-06-15T00:02:42.364882+00:00