<p>Inventory vectors are a collection of inventory items, the ones that are described to be either of type block, transaction or error. Inventory items of type transaction and block are references to actual <code>block</code> or <code>tx</code> messages being available for retrieval.
As such they are used in two places in the protocol:</p>

<ul>
<li>The <code>inv</code> message to communicate the availability of the respective full message</li>
<li>The <code>getdata</code> message to ask for the full message</li>
</ul>

<p>The inventory item is implicitly limited to 32 bytes in payload (hash) and a 4 byte type. Currently they are not used besides the original two hash types, but there were a few ideas flying around about getting inner Merkle-Tree nodes as a support for SPV clients to query the current state of the system.</p>

<p>Basically you can use anything you want in there, as long as you manage to stay inside the 32 byte + 4 byte limit, but preferably you'd keep the semantics of the hash + type being a reference to a retrievable item on the sender side.</p>

CC BY-SA 3.0
2013-05-20T09:44:05.980Z
2013-05-20T09:44:05.980Z
cdecker
<p>As described in the protocol specification bitcoin nodes respond to the <code>inv</code> command, which queries a node's knowledge of one or more objects, with an inventory vector. According to the bitcoin wiki, inventory vectors can either be of type transaction or type block. What else could be stored in a bitcoin inventory vector?
<a href="https://en.bitcoin.it/wiki/Protocol_specification#Inventory_Vectors" rel="nofollow">https://en.bitcoin.it/wiki/Protocol_specification#Inventory_Vectors</a></p>

<protocol><nodes><inventory>
What else can bitcoin inventory vectors be used for?
Kinnard Hockenhull
# What else can bitcoin inventory vectors be used for?

(Asked by: username_0 on 2013-05-20)

As described in the protocol specification bitcoin nodes respond to the `inv` command, which queries a node's knowledge of one or more objects, with an inventory vector. According to the bitcoin wiki, inventory vectors can either be of type transaction or type block. What else could be stored in a bitcoin inventory vector?
<https://en.bitcoin.it/wiki/Protocol_specification#Inventory_Vectors>

**Tags:** protocol, nodes, inventory


---

## 1 answers

### Answer by username_1 on 2013-05-20. Score: 1

Inventory vectors are a collection of inventory items, the ones that are described to be either of type block, transaction or error. Inventory items of type transaction and block are references to actual `block` or `tx` messages being available for retrieval.
As such they are used in two places in the protocol:

* The `inv` message to communicate the availability of the respective full message
* The `getdata` message to ask for the full message

The inventory item is implicitly limited to 32 bytes in payload (hash) and a 4 byte type. Currently they are not used besides the original two hash types, but there were a few ideas flying around about getting inner Merkle-Tree nodes as a support for SPV clients to query the current state of the system.

Basically you can use anything you want in there, as long as you manage to stay inside the 32 byte + 4 byte limit, but preferably you'd keep the semantics of the hash + type being a reference to a retrievable item on the sender side.


---

