{"type":"rich","version":"1.0","author_name":"npub1xukrzempxc95ags094lgrfvnvwm7gkuwj3d98qwrzgsynskyhp9qkfzef0","author_url":"https://nostr.ae/npub1xukrzempxc95ags094lgrfvnvwm7gkuwj3d98qwrzgsynskyhp9qkfzef0","provider_name":"njump","provider_url":"https://nostr.ae","html":"📅 Original date posted:2015-07-21\n📝 Original message:I think it's not a horrible idea to just add a field into the transaction\nmetadata for N_SIG_OPS in the script_sig\n\nIt is much simpler in implementation if the concern is complexity (once a\ntransaction goes above N_SIG_OPS it could be considered invalid, number\ncomputed must be equal). It wouldn't even need to be stored permanently as\nit can be pruned easily and recomputed later (hashes would protect against\nbuggy complicated sig counting code).\n\nFurthermore, it would differentiate a branch with different counts well.\n\n\n\nOn Wed, Jul 22, 2015 at 2:09 AM, Gavin Andresen via bitcoin-dev \u003c\nbitcoin-dev at lists.linuxfoundation.org\u003e wrote:\n\n\u003e On Mon, Jul 20, 2015 at 4:55 PM, Gregory Maxwell \u003cgmaxwell at gmail.com\u003e\n\u003e wrote:\n\u003e\n\u003e\u003e On Mon, Jul 20, 2015 at 7:10 PM, Gavin Andresen via bitcoin-dev\n\u003e\u003e \u003cbitcoin-dev at lists.linuxfoundation.org\u003e wrote:\n\u003e\u003e \u003e Mitigate a potential CPU exhaustion denial-of-service attack by limiting\n\u003e\u003e \u003e the maximum size of a transaction included in a block.\n\u003e\u003e\n\u003e\u003e This seems like a fairly indirect approach. The resource being watched\n\u003e\u003e for is not the size (otherwise two transactions for 200k would be\n\u003e\u003e strictly worse than one 200k transactions) but the potential of N^2\n\u003e\u003e costs related to repeated hashing in checksig; which this ignores.\n\u003e\u003e\n\u003e\n\u003e Yes.  The tradeoff is implementation complexity: it is trivial to check\n\u003e transaction size,\n\u003e not as trivial to count signature operations, because\n\u003e number-of-bytes-in-transaction\n\u003e doesn't require any context.\n\u003e\n\u003e But I would REALLY hate myself if in ten years a future version of me was\n\u003e struggling to\n\u003e get consensus to move away from some stupid 100,000 byte transaction size\n\u003e limit\n\u003e I imposed to mitigate a potential DoS attack.\n\u003e\n\u003e So I agree, a limit on sigops is the right way to go. And if that is being\n\u003e changed,\n\u003e might as well accurately count exactly how many sigops a transaction\n\u003e actually\n\u003e requires to be validated...\n\u003e\n\u003e --\n\u003e --\n\u003e Gavin Andresen\n\u003e\n\u003e\n\u003e _______________________________________________\n\u003e bitcoin-dev mailing list\n\u003e bitcoin-dev at lists.linuxfoundation.org\n\u003e https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev\n\u003e\n\u003e\n-------------- next part --------------\nAn HTML attachment was scrubbed...\nURL: \u003chttp://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20150722/6ff84cc8/attachment-0001.html\u003e"}
