<p>The <code>inv_vect</code> object is 36 bytes long (a <code>uint32_t</code> for the type of object and a <code>char[32]</code> for the hash). 50000 * 36 / 1000000 = 1.8 MB. I think it's a simple as that or I didn't understand you properly.</p>

CC BY-SA 3.0
2014-09-04T08:59:32.243Z
2014-09-04T08:59:32.243Z
Jori
<p>From the Bitcoin wiki's <a href="https://en.bitcoin.it/wiki/Protocol_specification#getdata" rel="nofollow noreferrer">Protocol Specification</a> page:</p>
<blockquote>
<h3>getdata</h3>
<p>getdata is used in response to inv, to retrieve the content of a specific object, and is usually sent after receiving an inv packet, after filtering known elements. It can be used to retrieve transactions, but only if they are in the memory pool or relay set - arbitrary access to transactions in the chain is not allowed to avoid having clients start to depend on nodes having full transaction indexes (which modern nodes do not).</p>
<p>Payload (maximum payload length: 1.8 Megabytes or 50000 entries)</p>
</blockquote>
<p>I see the point in the code where the client enforces the 50000 entry limit. But where does it limit how large the payload is? It's not the send limit, that's 1 MiB. (by default) It's not the receive limit, that's 5 MiB.</p>
<p>Is the wiki wrong?</p>

<protocol>
Maximum `getdata` message size
Nick ODell
# Maximum `getdata` message size

(Asked by: username_0 on 2014-09-04)

From the Bitcoin wiki's [Protocol Specification](https://en.bitcoin.it/wiki/Protocol_specification#getdata) page:

> ### getdata
>
> getdata is used in response to inv, to retrieve the content of a specific object, and is usually sent after receiving an inv packet, after filtering known elements. It can be used to retrieve transactions, but only if they are in the memory pool or relay set - arbitrary access to transactions in the chain is not allowed to avoid having clients start to depend on nodes having full transaction indexes (which modern nodes do not).
>
> Payload (maximum payload length: 1.8 Megabytes or 50000 entries)

I see the point in the code where the client enforces the 50000 entry limit. But where does it limit how large the payload is? It's not the send limit, that's 1 MiB. (by default) It's not the receive limit, that's 5 MiB.

Is the wiki wrong?

**Tags:** protocol


---

## 1 answers

### Answer by username_1 on 2014-09-04. Score: 2 | Accepted answer

The `inv_vect` object is 36 bytes long (a `uint32_t` for the type of object and a `char[32]` for the hash). 50000 \* 36 / 1000000 = 1.8 MB. I think it's a simple as that or I didn't understand you properly.


---

