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