<!DOCTYPE html>
<html><head>
    <meta charset="UTF-8">
</head><body><p>Thank you so much for taking time to actually review the codes. I hope you will&#160;keep raising questions when you feel something might be wrong. This is how things supposed to work and we should&#160;not be affected by some forum discussions.</p><blockquote type="cite">On August 26, 2016 at 9:16 AM Sergio Demian Lerner &#60;sergio.d.lerner@gmail.com&#62; wrote:<br><br><div dir="ltr"><div>Because there was a discussion on reddit about this topic, I want to clarify that Johnson Lau explained how a check in the code prevents this attack.<br></div><div>So there is no real attack.<br></div><div><br></div><div>Also note that the subject of this thread has a question mark, which means that I&#39;m asking the community for clarification, not asserting the existence of a vulnerability.<br><br></div><div>The segwit code is complex, and some key parts of the consensus code are spread over the source files (such as state.CorruptionPossible() relation to DoS banning, IsNull() check in witness program serialization, etc.). <br><br></div><div>Thanks again Johnson for your clarifications.<br></div><div><br></div></div><div class="ox-455267db53-gmail_extra"><br><div class="ox-455267db53-gmail_quote">On Wed, Aug 24, 2016 at 10:49 PM, Johnson Lau &#60;<a href="mailto:jl2012@xbt.hk" target="_blank">jl2012@xbt.hk</a>&#62; wrote:<br><blockquote><u></u><div><p>Adding witness data to a non-segwit script is invalid by consensus:</p><p><a href="https://github.com/bitcoin/bitcoin/blob/d612837814020ae832499d18e6ee5eb919a87907/src/script/interpreter.cpp#L1467" target="_blank">https://github.com/bitcoin/<wbr/>bitcoin/blob/<wbr/>d612837814020ae832499d18e6ee5e<wbr/>b919a87907/src/script/<wbr/>interpreter.cpp#L1467</a></p><p><br></p><p>This PR will detect such violation early and ban the peer:</p><p><a href="https://github.com/bitcoin/bitcoin/pull/8499" target="_blank">https://github.com/bitcoin/<wbr/>bitcoin/pull/8499</a></p><p>&#160;<br></p><p><br></p><p>Another approach is to run the scripts of all incoming transactions. That&#39;s not too bad as you have already&#160;fetched the utxos which is a major part of validation.</p></div></blockquote></div><br></div></blockquote></body></html>