Looking for documentation on getpeerinfo fields

Discussion of development releases of Prohashing.
Post Reply
User avatar
Steve Sokolowski
Posts: 3777
Joined: Wed Aug 27, 2014 3:27 pm
Location: State College, PA

Looking for documentation on getpeerinfo fields

Post by Steve Sokolowski » Sun Apr 28, 2019 9:40 am

I recently noticed that many daemons have a lot of peers that seem not to be relaying our blocks to the network, so I wrote a program to examine and ban peers that connect but are not full nodes. For example, there are peers with useragent string "ViaBTCbitpeer" that connect to almost every daemon, including ZCash, but never fully synchronize. For some networks, the wrong peers are connected - there are a lot of "BitcoinABC" peers connected to the Bitcoin SV daemon. Other peers indicate they have no blocks, but use a lot of data for an unknown reason.

One of the criteria I've been using to eliminate peers is by looking at synced_blocks and synced_headers. For some peers, however, the values of these fields are not equal. There are some peers where synced_blocks == -1, while synced_headers is some other number. I found that these peers don't seem to add value to the network.

Why would a peer have synced_headers equal to some number, but synced_blocks remains -1?
Post Reply