{"type":"rich","version":"1.0","author_name":"npub1dw88wd5gqsqn6ufxhf9h03uk8087l7gfzdtez5csjlt6pupu4pwsj8plrw","author_url":"https://nostr.ae/npub1dw88wd5gqsqn6ufxhf9h03uk8087l7gfzdtez5csjlt6pupu4pwsj8plrw","provider_name":"njump","provider_url":"https://nostr.ae","html":"📅 Original date posted:2019-03-09\n📝 Original message:Hi Matt,\n\nOn Fri, Mar 8, 2019 at 1:35 PM Matt Corallo \u003clf-lists at mattcorallo.com\u003e\nwrote:\n\n\u003e Replies inline.\n\u003e\n\u003e On 3/8/19 3:57 PM, Russell O'Connor wrote:\n\u003e \u003e On Thu, Mar 7, 2019 at 2:50 PM Matt Corallo \u003clf-lists at mattcorallo.com\n\u003e \u003e \u003cmailto:lf-lists at mattcorallo.com\u003e\u003e wrote:\n\u003e \u003e It's very easy to construct a practical script using OP_CODESEPARATOR.\n\u003e \u003e\n\u003e \u003e IF \u003c2\u003e \u003cALICEPUBKEY\u003e \u003cBOBPUBKEY\u003e \u003c2\u003e CHECKMULTISIGVERIFY ELSE\n\u003e \u003e CODESEPARATOR \u003cALICEPUBKEY\u003e CHECKSIGVERFY ENDIF\n\u003e \u003e\n\u003e \u003e Now when someone hands Alice, the CFO of XYZ corp., some transaction,\n\u003e \u003e she has the option of either signing it unilaterally herself, or\n\u003e \u003e creating a partial signature such that the transaction additionally\n\u003e \u003e needs Bob, the CEOs signature as well, and Alice's choice is committed\n\u003e \u003e to the blockchain for auditing purposes later.\n\u003e \u003e\n\u003e \u003e Now, there are many things you might object about this scheme, but my\n\u003e \u003e point is that (A) regardless of what you think about this scheme, it, or\n\u003e \u003e similar schemes, may have been devised by users, and (B) users may have\n\u003e \u003e already committed funds to such schemes, and due to P2SH you cannot know\n\u003e \u003e that this is not the case.\n\u003e\n\u003e The common way to set that up is to have a separate key, but, ok, fair\n\u003e enough. That said, the argument that \"it may be hidden by P2SH!\" isn't\n\u003e sufficient here. It has to *both* be hidden by P2SH and have never been\n\u003e spent from (either on mainnet or testnet) or be lock-timed a year in the\n\u003e future. I'm seriously skeptical that someone is using a highly esoteric\n\u003e scheme and has just been pouring money into it without ever having\n\u003e tested it or having withdrawn any money from it whatsoever. This is just\n\u003e a weird argument.\n\u003e\n\nNo one is required to test their Scripts on a public testnet; they can use\nregtest. Because these transactions are non-standard on mainnet, it could\ntake years to arrange for these funds to be recovered by having their\ntransactions mined directly, or take years to become valuable enough to be\nworth bothering having them directly mined.  As I have noted elsewhere, you\ncannot first make transactions non-standard and then use the fact that you\ndon't see them being used on mainnet to justify a soft-fork.\n\nMy argument isn't weird; it is principled.  You are skeptical that any uses\nof OP_CODESEPARATOR have P2SH commitments.  I am also skeptical, and so is\neveryone reading this mailing list.  But none of us know this with\ncertainty, and it is /wrong/ for any of us to gamble with other people's\nmoney that our assumptions are true.\n\nInstead, it is this soft-fork proposal that is unprecedented. Let me\nreiterate what I posted in another thread:\n\nBitcoin has *never* made a soft-fork, since the time of Satoishi, that\ninvalidated transactions that send secured inputs to secured outputs\n(excluding uses of OP_NOP1-OP_NOP10).\n\nThe fact that Bitcoin has stuck to this principle gives me and everyone\nelse confidence in the protocol; that anyone can secure their funds by\nwhatever scheme they dream up, and deploy it without needing permission or\nanyone else to vet their Scripts. So long as they are not impairing the\nBitcoin protocol itself, the most that Bitcoin Core will do is stop\nrelaying their transactions by default.\n\nUndermining this principle means undermining what provides Bitcoin's value\nin the first place.\n\nThe problem in this particular case is that there exist valid secure\ntransactions that make use OP_CODESEPARATOR such that these transactions\nthemselves impair the Bitcoin protocol (through excessive validation costs)\nin a way that, AFAIU, is fundamental to the nature of such transactions (in\nparticular, it isn't just due to an implementation detail of Bitcoin\nCore).  Thus to fix this vulnerability we must necessarily violate the\nprinciple of not invalidating, secure transactions.  However, this fact\nisn't license to freely invalidate any transactions we want.  We ought to\nstrive to minimize the scope of violation of this principle.  Alice and Bob\nfrom XYZ. corp should be able to keep their benign transaction illustrated\nabove, and we only eliminate those transactions that actually impair the\nBitcoin protocol.\n\nThis is the perfect opportunity to show the world that Bitcoin Core simply\ndoesn't take chances when it comes to other people money.\n\n\u003e Please don't strawman my position.  I am not suggesting we don't fix a\n\u003e \u003e vulnerability in Bitcoin.  I am suggesting we find another way.  One\n\u003e \u003e that limits the of risk destroying other people's money.\n\u003e \u003e\n\u003e \u003e Here is a more concrete proposal:  No matter how bad OP_CODESEPARATOR\n\u003e \u003e is, it cannot be worse than instead including another input that spends\n\u003e \u003e another identically sized UTXO.  So how about we soft-fork in a rule\n\u003e \u003e that says that an input's weight is increased by an amount equal to the\n\u003e \u003e number of OP_CODESEPARATORs executed times the sum of weight of the UTXO\n\u003e \u003e being spent and 40 bytes, the weight of a stripped input. The risk of\n\u003e \u003e destroying other people's money is limited and AFAIU it would completely\n\u003e \u003e address the vulnerabilities caused by OP_CODESEPARATOR.\n\u003e\n\u003e You're already arguing that someone has such an esoteric use of script,\n\u003e suggesting they aren't *also* creating pre-signed, long-locktimed\n\u003e transactions with many inputs isn't much of a further stretch\n\u003e (especially since this may result in the fee being non-standardly low if\n\u003e you artificially increase its weight).\n\u003e\n\nThere is no consensus rule about minimum fees, and CPFP could add the more\nfees. But yes, I am saying that Alice and Bob could be building on their\ntransaction illustrated above, but not creating a many input tx that\nwouldn't fit into a block with my proposed added weight, because if their\ntransaction won't fit into a block with the added weight then it was a\nmalicious transaction to begin with.\n\nDo you not recognize the material difference between a soft-fork that\ndoubles the cost of a transaction like Alice and Bob's versus making their\ntransaction entirely illegal?\n\n\n\u003e Note that \"just limit number of OP_CODESEPARATOR calls\" results in a ton\n\u003e of complexity and reduces the simple analysis that fees (almost) have\n\u003e today vs just removing it allows us to also remove a ton of code.\n\n\nFurther note that if you don't remove it getting the efficiency wins\n\u003e right is even harder because instead of being able to cache sighashes\n\u003e you now have to (at a minimum) wipe the cache between each\n\u003e OP_CODESEPARATOR call, which results in a ton of additional\n\u003e implementation complexity.\n\u003e\n\nHow can this be \"additional\" complexity when this is how the protocol works\ntoday?  All you have to do is not change the semantics of\nOP_CODESEPARATOR.  It is literally no work.\nRegarding the efficiency wins, let me repeat myself: The performance costs\nof wiping the cached sighashs is not worse than what the performance costs\nwould be if the transaction had an additional input spending an equally\nsized UTXO.\n\n\n\u003e \u003e      \u003e I suggest an alternative whereby the execution of OP_CODESEPARATOR\n\u003e \u003e      \u003e increases the transactions weight suitably as to temper the\n\u003e \u003e      \u003e vulnerability caused by it.  Alternatively there could be some\n\u003e \u003e     sort of\n\u003e \u003e      \u003e limit (maybe 1) on the maximum number of OP_CODESEPARATORs\n\u003e \u003e     allowed to be\n\u003e \u003e      \u003e executed per script, but that would require an argument as to why\n\u003e \u003e      \u003e exceeding that limit isn't reasonable.\n\u003e \u003e\n\u003e \u003e     You could equally argue, however, that any such limit could render\n\u003e some\n\u003e \u003e     moderately-large transaction unspendable, so I'm somewhat skeptical\n\u003e of\n\u003e \u003e     this argument. Note that OP_CODESEPARATOR is non-standard, so getting\n\u003e \u003e     them mined is rather difficult in any case.\n\u003e \u003e\n\u003e \u003e\n\u003e \u003e I already know of people who's funds are tied up due to in other changes\n\u003e \u003e to Bitcoin Core's default relay policy.  Non-standardness is not an\n\u003e \u003e excuse to take other people's tied up funds and destroy them permanently.\n\u003e\n\u003e Huh?! The whole point of non-standardness in this context is to (a) make\n\u003e soft-forking something out safer by derisking miners not upgrading right\n\u003e away and (b) signal something that may be a candidate for soft-forking\n\u003e out so that we get feedback. Who is getting things disabled who isn't\n\u003e bothering to *tell* people that their use-case is being hurt?!\n\u003e\n\nPeople have told me that they are hurt by some other non-standardness\nchanges and I understand that they have been sitting on those funds for\nyears.  Maybe they don't realize their is some place to complain or maybe\nthey think there must be a good reason why they are not allowed to do what\nthey were previously allowed to do.  Perhaps others don't want to risk\nblowing their pseudonymity.  Perhaps they think that attempting to undo\nsome of these non-standardness changes is futile.  I can bring up the\nspecific cases I've encountered in a new thread if you think it is\nworthwhile.\n\nRegarding OP_CODESEAPRATOR specifically, disabling the rely of such\ntransactions partially mitigates the vulnerability.  Once the vulnerability\nis properly patched, for example by suitably increasing the weight of the\noperation or opcode, we could drop the prohibition on relaying such\ntransactions.  Non-standardness is not necessarily a path to a new\nconsensus rule. We have several non-standardness rules in place that are\nnever intended to become new consensus rules.  Sometimes non-standardness\nis a temporary mitigation.\n-------------- next part --------------\nAn HTML attachment was scrubbed...\nURL: \u003chttp://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20190309/9a5108cc/attachment.html\u003e"}
