<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>MultiChain Developer Q&amp;A - Recent questions tagged merkleblock</title>
<link>https://www.multichain.com/qa/tag/merkleblock</link>
<description>Powered by Question2Answer</description>
<item>
<title>Missing exactly one transaction after &quot;merkleblock&quot;-message</title>
<link>https://www.multichain.com/qa/19804/missing-exactly-one-transaction-after-merkleblock-message</link>
<description>&lt;p&gt;Hi,&lt;/p&gt;&lt;p&gt;I've come across an &quot;issue&quot; where after a &quot;merkleblock&quot;-message Multichain leaves out exactly one of transactions in the following &quot;tx&quot;-messages. I'm not sure whether this is intended behavior and I just misunderstood the Bitcoin documentation or an actual problem.&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-decoration: underline;&quot;&gt;Here's the setup:&lt;/span&gt;&lt;br&gt;I'm using Multichain as a single full node in combination with a browser based Bitcoin SPV node (bcoin).&lt;br&gt;When the SPV node creates and announces a new unconfirmed transaction Multichain receives, validates and adds it to the next block as expected. Multichain proceeds to announce the new block (&quot;inv&quot;-message) and the SPV node requests it (&quot;getdata&quot;-message) as should be. In response, Multichain sends a &quot;merkleblock&quot;-message to the SPV&amp;nbsp;node as well as separate &quot;tx&quot;-messages for all but one transaction of the newly created block.&lt;/p&gt;&lt;p&gt;From the Bitcoin documentation [1]:&lt;br&gt;&lt;em&gt;The merkleblock message is a reply to a getdata message which requested a block using the inventory type MSG_MERKLEBLOCK. It is only part of the reply: if &lt;span style=&quot;text-decoration: underline;&quot;&gt;any &lt;/span&gt;matching transactions are found, they will be sent separately as tx messages.&lt;/em&gt;&lt;/p&gt;&lt;p&gt;And from [2]:&lt;br&gt;&lt;em&gt;After a merkleblock, transactions matching the bloom filter are automatically sent in tx messages.&lt;/em&gt;&lt;/p&gt;&lt;p&gt;Since I &lt;em&gt;didn't &lt;/em&gt;set a bloom filter I expected one &quot;tx&quot;-message for every transaction that is included in the block. However, Multichain leaves out &lt;span style=&quot;text-decoration: underline;&quot;&gt;exactly one&lt;/span&gt; of those transactions.&lt;br&gt;I've noticed that the missing transaction is &lt;span style=&quot;text-decoration: underline;&quot;&gt;always &lt;/span&gt;the one the SPV node announced earlier. My best guess here is that Multichain assumes the SPV node won't need that transaction a second time since it announced it in the first place? Is this intended behavior by Multichain or am I missing something here?&lt;/p&gt;&lt;p&gt;Thanks in advance and best regards&lt;/p&gt;&lt;p&gt;[1] &lt;a rel=&quot;nofollow&quot; href=&quot;https://bitcoin.org/en/developer-reference#merkleblock&quot;&gt;https://bitcoin.org/en/developer-reference#merkleblock&lt;/a&gt;&lt;br&gt;[2] &lt;a rel=&quot;nofollow&quot; href=&quot;https://en.bitcoin.it/wiki/Protocol_documentation#filterload.2C_filteradd.2C_filterclear.2C_merkleblock&quot;&gt;https://en.bitcoin.it/wiki/Protocol_documentation#filterload.2C_filteradd.2C_filterclear.2C_merkleblock&lt;/a&gt;&lt;/p&gt;</description>
<guid isPermaLink="true">https://www.multichain.com/qa/19804/missing-exactly-one-transaction-after-merkleblock-message</guid>
<pubDate>Mon, 04 May 2020 17:30:01 +0000</pubDate>
</item>
</channel>
</rss>