From the Bitcoin wiki's Protocol Specification page:


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?

1 Answer 1


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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.