Files
specification/protocol/network/messages/inv.md
T
qr8ruwyx0u7fqeyu5n49t2paw0ghhp8xsgmffesqzs 24de826eb0 wiki commit
2020-02-06 13:08:26 -05:00

32 lines
1.5 KiB
Markdown

<div class="cwikmeta">{
"title":"INV",
"related":["/protocol","/protocol/network/messages/getdata.md","/protocol/network/messages/filterload.md","/protocol/network/messages/filterclear.md"]
}</div>
*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.
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.
| 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
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.
##### Type
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)
##### Hash
The [hash identifier](/glossary/hash__identifier.md) of the available object.