2020-02-06 12:37:37 -05:00
<div class="cwikmeta">{
"title":"INV",
2020-02-06 13:08:26 -05:00
"related":["/protocol","/protocol/network/messages/getdata.md","/protocol/network/messages/filterload.md","/protocol/network/messages/filterclear.md"]
2020-02-06 12:37:37 -05:00
}</div>
2020-11-04 13:23:02 -05:00
* Notifies peers about the existence of some information (block or transaction) *
Based on selected services in the [VERSION ](/protocol/network/messages/version.md ) message, INV messages may not be sent.
2020-02-06 12:37:37 -05:00
2020-11-04 13:23:02 -05:00
If a bloom filter has been sent to this node via [FILTERLOAD ](/protocol/network/messages/filterload.md ), transaction INVs will only be sent if they match the bloom filter.
2020-02-06 12:37:37 -05:00
2020-11-04 13:23:02 -05:00
| compact int | 4 bytes | 32 bytes |... | 4 bytes | 32 bytes |
|----------|---------|----------|---|---------|----------|
|[vector ](/protocol/p2p/vector.md ) size N of| type 1 | hash 1 | | type N | hash N
2020-02-06 12:37:37 -05:00
2020-11-04 13:23:02 -05:00
NOTE: Since a block header is a relatively small data structure, and block propagation speed is an important network metric, a peer may send HEADER messages in place of INV messages when a block arrives.
2020-02-06 12:37:37 -05:00
2020-11-04 13:23:02 -05:00
##### Type
2020-02-06 12:37:37 -05:00
The type of the object that is available.
| Type | Value|
|------|------|
| 1 | Transaction |
| 2 | Block |
| 3 | Filtered Block (partial block with merkle proof)
| 4 | Compact block
| 5 | Xthin block (Bitcoin Unlimited)
| 6 | Graphene Block (Bitcoin Unlimited)
Implementations: [C++ ](https://github.com/BitcoinUnlimited/BitcoinUnlimited/blob/eb264e627e231f7219e60eef41b4e37cc52d6d9d/src/protocol.h#L477 )
2020-11-04 13:23:02 -05:00
##### Hash
The [hash identifier ](/glossary/hash__identifier.md ) of the available object.