Merkle branch verification & tail-call semantics for generalized MAST



Summary:

Mark Friedenbach apologizes for the delay in responding to emails due to a cold. Johnson Lau had pointed out that tail-call execution semantics require "unclean stack", which is invalid in BIP141. A new witness version could be used instead of an "unclean stack". The current SigOp counting method used by Bitcoin is flawed and should move to a single linear metric that combines all factors with appropriate coefficients. A better way of handling this problem, which works for both SigOps and HashOps, is to have the witness commit to the maximum resources consumed by validation of the spend of the coin. Maintaining static analysability for global limit(s) is important to prevent attacks on relay and mining nodes. Re-evaluating whether we should be counting SigOps other than for legacy consensus rule compliance is possible. Witness script versioning is fully compatible with P2SH and BIP173. The minimal BIP114 could be really simple, like hiding scripts in a hash. A repository containing the latest implementation of BIP 114 can be found on GitHub.


Updated on: 2023-05-20T03:42:32.588061+00:00