LearnBitcoin

Bitcoin Dev Archive 2014

getpeerinfo results

3 messages, 22 Feb 2014. Started by Ronald Hoffman.

Wladimir J. van der Laan (2), Ronald Hoffman

Permalink Original thread on gnusha.org

Ronald Hoffman permalink original

I noticed that the 'services' field appears to be garbled in the latest source code level from github. Bitcoind is connected to my Java node server at 127.0.0.1:8333. I thought I was sending a bad 'version' message but I get the correct results using 0.8.6. So it appears that something changed in 0.9.0.

Here is bitcoin-cli talking to bitcoind (0.9.0)

$ bitcoin-cli getpeerinfo
[
    {
        "addr" : "127.0.0.1:8333",
        "services" : "0000000164x",
        "lastsend" : 1393036635,
        "lastrecv" : 1393036635,
        "bytessent" : 100169,
        "bytesrecv" : 53633565,
        "conntime" : 1393036133,
        "pingtime" : 0.00000000,
        "version" : 70002,
        "subver" : "/JavaBitcoin:1.0/",
        "inbound" : false,
        "startingheight" : 287125,
        "banscore" : 0,
        "syncnode" : true
    }
]

Here is the same bitcoin-cli talking to bidcoind (0.8.6)

$ bitcoin-cli getpeerinfo
[
    {
        "addr" : "127.0.0.1:8333",
        "services" : "00000001",
        "lastsend" : 1393037165,
        "lastrecv" : 1393037165,
        "bytessent" : 77494,
        "bytesrecv" : 13054,
        "conntime" : 1393037135,
        "version" : 70002,
        "subver" : "/JavaBitcoin:1.0/",
        "inbound" : false,
        "startingheight" : 287126,
        "banscore" : 0,
        "syncnode" : true
    }
]

Ron

Wladimir J. van der Laan in reply to Ronald Hoffman permalink original

On Sat, Feb 22, 2014 at 3:56 AM, Ronald Hoffman <ronald.hoffman6@gmail•com>wrote:

Quoted text (6 lines)
> I noticed that the 'services' field appears to be garbled in the latest
> source code level from github.  Bitcoind is connected to my Java node
> server at 127.0.0.1:8333.  I thought I was sending a bad 'version'
> message but I get the correct results using 0.8.6.  So it appears that
> something changed in 0.9.0.
>

This warrants an issue on github: https://github.com/bitcoin/bitcoin/issues/new

Quoted text (8 lines)
> Here is bitcoin-cli talking to bitcoind (0.9.0)
>
> $ bitcoin-cli getpeerinfo
> [
>     {
>         "addr" : "127.0.0.1:8333",
>         "services" : "0000000164x",
>

What git revision are you testing with? Built with what compiler on which platform?

Do all peers in getpeerinfo show up garbled, or just yours? Does it literally show as "164x"?

I just tried getpeerinfo locally and all my peers show as: ""services" : "00000001" as expected.

Wladimir

Wladimir J. van der Laan in reply to Wladimir J. van der Laan permalink original

On Sat, Feb 22, 2014 at 9:08 AM, Wladimir <laanwj@gmail•com> wrote:

Quoted text (13 lines)
> On Sat, Feb 22, 2014 at 3:56 AM, Ronald Hoffman <ronald.hoffman6@gmail•com
> > wrote:
>
>> I noticed that the 'services' field appears to be garbled in the latest
>> source code level from github.  Bitcoind is connected to my Java node
>> server at 127.0.0.1:8333.  I thought I was sending a bad 'version'
>> message but I get the correct results using 0.8.6.  So it appears that
>> something changed in 0.9.0.
>>
>
> This warrants an issue on github:
> https://github.com/bitcoin/bitcoin/issues/new
>

I think I found (and fixed) the problem already. This is some windows inttypes.h bordercase. Can you test with this?:

https://github.com/bitcoin/bitcoin/pull/3729

Wladimir