{
"title":"INV",
"related":["/protocol","/protocol/network/messages/getdata.md","/protocol/network/messages/filterload.md","/protocol/network/messages/filterclear.md"]
}
# Announcement: Inventory ("inv")
Notifies peers about the existence of some information (block or transaction).
Based on selected services in the [`version`](/protocol/network/messages/version) message, inventory messages may not be sent.
If a bloom filter has been sent to this node via [`filterload`](/protocol/network/messages/filterload), a transaction inventory will only be sent for transactions that match the bloom filter.
## Message Format
| Field | Length | Format | Description |
|--|--|--|--|
| inventory count | variable | [variable length integer](/protocol/formats/variable-length-integer) | The number of inventory items in this message. |
| inventory items | `inventory_count` * 36 bytes | `inventory_count` [inventory items](#inventory-item-format) | The set of inventory items being transmitted. Up to 50,000 inventory items can be sent in a single inventory message.|
NOTE: Since a block header is a relatively small data structure, and block propagation speed is an important network metric, a peer may send [`headers`](/protocol/network/messages/headers) messages in place of inventory messages when a block arrives. This behavior can be requested using the [`sendheaders`](/protocol/network/messages/sendheaders) message.
#### Inventory Item Format
| Field | Length | Format | Description |
|--|--|--|--|
| type | 4 bytes | [inventory type](#inventory-types)[(LE)](/protocol/misc/endian/little) | Indicates what the following hash represents. |
| item hash | 32 bytes | bytes[(LE)](/protocol/misc/endian/little) | The [hash](/protocol/blockchain/hash) that identifies the item. |
#### Inventory Types
The type of the object that is available.
| Type | Value|
|------|------|
| 0x0001 | Transaction |
| 0x0002 | Block |
| 0x0003 | Filtered Block (partial block with merkle proof)
| 0x0004 | Compact block
| 0x0005 | Xthin block (Bitcoin Unlimited)
| 0x0006 | Graphene Block (Bitcoin Unlimited)
| 0x94A0 | [Double Spend Proof - Beta](/protocol/network/messages/dsproof-beta) |