Block syncing to new nodes.

+1 vote

Hi team, 

I 've a 2 node multichain. The nodes were in sync and working fine, I started with load testing of the nodes and gradually on the 2nd node I started to get memory errors like below. Anyway that's another story. 

EXCEPTION: St9bad_alloc


bitcoin in ProcessMessages()

So after this I deleted the ~/.multichain/chain1 from my 2nd node and started the multichain on 2nd node again. It took some time to get the blocks synced (the inflight section of getpeerinfo didn't show any blocks so I assumed they are synced. )


Now on the 2nd node when I do getinfo and getpeerinfo I see respectively; 

"blocks" : 1287,


        "inbound" : true,
        "startingheight" : 1287,
        "banscore" : 0,
        "synced_headers" : 1287,
        "synced_blocks" : 1287,

Seems alright. 


But when I do the same on 1st node. 

   "blocks" : 1287,


       "inbound" : false,
        "startingheight" : 632,
        "banscore" : 0,
        "synced_headers" : 634,
        "synced_blocks" : -1,

Doesn't seem alright to me. 

1. What does the inbound imply here?

2. why my sync header and block is different on node 1?





asked Nov 14, 2017 by ashish235
Update --

I restarted the node 1, and after that there was some changes.

Now my node 1 has 1383 blocks from getinfo:
blocks" : 1383,

but from getpeerinfo:
        "startingheight" : 1372,
        "banscore" : 0,
        "synced_headers" : 1372,
        "synced_blocks" : 1372,

- While Node 2 has
        "startingheight" : 1372,
        "banscore" : 0,
        "synced_headers" : 1383,
        "synced_blocks" : 1383,

This discrepancy between synced blocked imply any syncing issue? also the "startingheight" and blocks from getinfo and getpeerinfo is bit confusing for me.


1 Answer

+1 vote

As mentioned before, the memory errors were simply because you did not have enough memory on the system it was running on. Apart from that, there's nothing wrong with what you're seeing. The inbound value just shows which node initiated the peer-to-peer connection, and which node received it. And the synced_* values are about who received data from whom. If your nodes are in sync (i.e. same blocks and bestblockhash values in getblockchaininfo) everything is fine.

answered Nov 16, 2017 by MultiChain