github.com/vipernet-xyz/tm@v0.34.24/spec/p2p/messages/block-sync.md (about)

     1  ---
     2  order: 2
     3  ---
     4  
     5  # Block Sync
     6  
     7  ## Channel
     8  
     9  Block sync has one channel.
    10  
    11  | Name              | Number |
    12  |-------------------|--------|
    13  | BlockchainChannel | 64     |
    14  
    15  ## Message Types
    16  
    17  There are multiple message types for Block Sync
    18  
    19  ### BlockRequest
    20  
    21  BlockRequest asks a peer for a block at the height specified.
    22  
    23  | Name   | Type  | Description               | Field Number |
    24  |--------|-------|---------------------------|--------------|
    25  | Height | int64 | Height of requested block | 1            |
    26  
    27  ### NoBlockResponse
    28  
    29  NoBlockResponse notifies the peer requesting a block that the node does not contain it.
    30  
    31  | Name   | Type  | Description               | Field Number |
    32  |--------|-------|---------------------------|--------------|
    33  | Height | int64 | Height of requested block | 1            |
    34  
    35  ### BlockResponse
    36  
    37  BlockResponse contains the block requested.
    38  
    39  | Name  | Type                                         | Description     | Field Number |
    40  |-------|----------------------------------------------|-----------------|--------------|
    41  | Block | [Block](../../core/data_structures.md#block) | Requested Block | 1            |
    42  
    43  ### StatusRequest
    44  
    45  StatusRequest is an empty message that notifies the peer to respond with the highest and lowest blocks it has stored.
    46  
    47  > Empty message.
    48  
    49  ### StatusResponse
    50  
    51  StatusResponse responds to a peer with the highest and lowest block stored.
    52  
    53  | Name   | Type  | Description                                                       | Field Number |
    54  |--------|-------|-------------------------------------------------------------------|--------------|
    55  | Height | int64 | Current Height of a node                                          | 1            |
    56  | base   | int64 | First known block, if pruning is enabled it will be higher than 1 | 1            |
    57  
    58  ### Message
    59  
    60  Message is a [`oneof` protobuf type](https://developers.google.com/protocol-buffers/docs/proto#oneof). The `oneof` consists of five messages.
    61  
    62  | Name              | Type                             | Description                                                  | Field Number |
    63  |-------------------|----------------------------------|--------------------------------------------------------------|--------------|
    64  | block_request     | [BlockRequest](#blockrequest)    | Request a block from a peer                                  | 1            |
    65  | no_block_response | [NoBlockResponse](#noblockresponse) | Response saying it doe snot have the requested block         | 2            |
    66  | block_response    | [BlockResponse](#blockresponse)   | Response with requested block                                | 3            |
    67  | status_request    | [StatusRequest](#statusrequest)   | Request the highest and lowest block numbers from a peer     | 4            |
    68  | status_response   | [StatusResponse](#statusresponse)  | Response with the highest and lowest block numbers the store | 5            |