Yay, op_codeseperator finally does something! The L1 cost of creating a groth16 garbled circuit, and publishing its inputs on bitcoin for validation, is only 1800 vb. A standard bitcoin transaction is about 300 vb, so with this op_codeseparator trick and groth16, you can validate anything on bitcoin for the cost of about 6 standard bitcoin transactions. Which, at current costs of 4 sats per vb, is about 7200 sats, or a bit less than $9. https://gist.github.com/RobinLinus/0fc7405ad7485c35465efb7996a7b014
Discussion
And -- as a reminder -- even this low cost is only a fallback: if someone tries to cheat in a bitvm contract, you run this script, and the cheater has to pay the cost. If *no one* tries to cheat (which is the "happy path") the cost is 1 standard size btc tx, or ~300 vb, or ~$0.69