<oembed><type>rich</type><version>1.0</version><author_name>npub1fvuxqdqg7klqqgy3yy8gdxjv4phu92sll5y8zqm2qe5qdrhxymhqf3vq7f</author_name><author_url>https://nostr.ae/npub1fvuxqdqg7klqqgy3yy8gdxjv4phu92sll5y8zqm2qe5qdrhxymhqf3vq7f</author_url><provider_name>njump</provider_name><provider_url>https://nostr.ae</provider_url><html>📅 Original date posted:2017-07-13&#xA;📝 Original message:Some responses..&#xA;&#xA;&gt;&#xA;&gt; The proposal adds another gratuitous limit to the system: A maximum&#xA;&gt; transaction size where none existed before, yet this limit is almost&#xA;&gt; certainly too small to prevent actual DOS attacks while it is also&#xA;&gt; technically larger than any transaction that can be included today&#xA;&gt; (the largest possible transaction today is 1mb minus the block&#xA;&gt; overheads).  The maximum resource usage for maliciously crafted 1MB&#xA;&gt; transaction is enormous and permitting two of them greatly exacerbates&#xA;&gt; the existing vulnerability.&#xA;&gt;&#xA;&gt;&#xA;I think that limiting the maximum transaction size may not be the best&#xA;possible solution to the N^2 hashing problem, yet it is not a bad start.&#xA;&#xA;There are several viable soft-forking solutions to it:&#xA;&#xA;1- Soft-fork to perform periodic reductions in the maximum non-segwit&#xA;checksigs per input (down to 20)&#xA;2- Soft-fork to perform periodic reductions in the number of non-segwit&#xA;checksigs per transaction. (down to 5K)&#xA;3- Soft-fork to perform periodic reductions in the amount of data hashed by&#xA;non-segwit checksigs.&#xA;&#xA;Regardless which one one picks, the soft-fork can be deployed with enough&#xA;time in advance to reduce the exposure. The risk is still low. Four years&#xA;have passed since I reported this vulnerability and yet nobody has&#xA;exploited it. The attack is highly anti-economical, yet every discussion&#xA;about the block size ends up citing this vulnerability.&#xA;&#xA;,&#xA;&#xA;&gt; &gt; Assuming the current transaction pattern is replicated in a 2 MB&#xA;&gt; plain-sized block that is 100% filled with transactions, then the&#xA;&gt; witness-serialized block would occupy 3.6 MB&#xA;&gt;&#xA;&gt; But in a worst case the result would be 8MB, which this document fails&#xA;&gt; to mention.&#xA;&gt;&#xA;&#xA;I will mention this worst case in the BIP.&#xA;&#xA;Even if artificially filling the witness space up to 8 MB is&#xA;anti-economical, Segwit exacerbates this problem because each witness byte&#xA;costs 1/4th of a non-witness byte, so the block bloat attack gets cheaper&#xA;than before. I think the guilt lies more in Segwit discount factor than in&#xA;the plain block size increase.&#xA;I would remove the discount factor altogether, and add a fixed (40 bytes)&#xA;discount for each input with respect to outputs (not for certain input&#xA;types), to incentivize the cleaning of the UTXO set. A discount for inputs&#xA;cannot be used to bloat an unlimited number of blocks, because for each&#xA;input the attacker needs to first create an output (without discount).&#xA;There is no need to incentivize removing the signatures from blocks,&#xA;because there is already an incentive to do so to save disk space.&#xA;&#xA;&#xA;&gt;&#xA;&gt; &gt; Deploy a modified BIP91 to activate Segwit. The only modification is&#xA;&gt; that the signal &#34;segsignal&#34; is replaced by &#34;segwit2x&#34;.&#xA;&gt;&#xA;&gt; This means that BIP-91 and your proposal are indistinguishable on the&#xA;&gt; network, because the string &#34;segsignal&#34; is merely a variable name used&#xA;&gt; in the software.&#xA;&gt;&#xA;&gt; No, it is exposed to the rpc mining interface (getblocktemplate). It must&#xA;be redefined, even if it&#39;s not a consensus change.&#xA;&#xA;&#xA;&gt;&#xA;-------------- next part --------------&#xA;An HTML attachment was scrubbed...&#xA;URL: &lt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20170713/94c52265/attachment.html&gt;</html></oembed>