Walletballance or assets not visible from peer.

+1 vote

Newbie alert! :)

Hi Team, 

Just installed multichain and followed the official get started guide and I 've 2 nodes running multichain. The 2nd node has connect, send and receive permissions. Now when I create an asset from the 1st it should be visible from the 2nd node and when I transfer it, I should be able to see the walletbalance of 2nd node from it. 

What's happening is I can create assets, but they are not visible from 2nd node. When I transfer the asset, it gets deducted from 1st node, but I can't see it on the 2nd node. 

Node: 1

    {
        "name" : "asset4",
        "issuetxid" : "1cfded38a8cbcaa36cff9848451f23f99fc4c27486a323b7276d8323e126eba8",
        "assetref" : "192-267-64796",
        "multiple" : 100,
        "units" : 0.01000000,
        "open" : false,
        "details" : {
        },
        "issueqty" : 1000.00000000,
        "issueraw" : 100000,
        "subscribed" : false
    }
]

 

Node 2

chain1: listassets
{"method":"listassets","params":[],"id":1,"chain_name":"chain1"}

[

Even though I've 4 different assets in the blockchain. 

 

I strange thing I noticed, not sure if it has any implication. It has to do with blocks and headers which are different in both the nodes. So a wild guess is my blocks are not in sync?

Node 1:

chain1: getblockchaininfo
{"method":"getblockchaininfo","params":[],"id":1,"chain_name":"chain1"}

{
    "chain" : "main",
    "chainname" : "chain1",
    "description" : "MultiChain chain1",
    "protocol" : "multichain",
    "setupblocks" : 60,
    "reindex" : false,
    "blocks" : 202,
    "headers" : 202,
    "bestblockhash" : "00e3ddd2ee5f887077f57243457db55d96a8ca8f166a4821a319a3e9ab2e2794",
    "difficulty" : 0.00000006,
    "verificationprogress" : 1.00000000,
    "chainwork" : "000000000000000000000000000000000000000000000000000000000000cb00"
 

Node 2:

chain1: getblockchaininfo
{"method":"getblockchaininfo","params":[],"id":1,"chain_name":"chain1"}

{
    "chain" : "main",
    "chainname" : "chain1",
    "description" : "MultiChain chain1",
    "protocol" : "multichain",
    "setupblocks" : 60,
    "reindex" : false,
    "blocks" : 0,
    "headers" : 191,
    "bestblockhash" : "00ba87b2664fcd92ee9e90b1ea5deea8ce615671a4025670ceaaefb441c96df0",
    "difficulty" : 0.00000006,
    "verificationprogress" : 1.00000000,
    "chainwork" : "0000000000000000000000000000000000000000000000000000000000000100"
}

Can anyone please help me here to move forward. 

Thanks.

- Ashish 

asked Nov 1, 2017 by ashish235

3 Answers

0 votes
Your node2 is not fully syncd with the chain by seeing the information provided above.. Let it sync for some more time and then try the listassets again..
answered Nov 1, 2017 by saravana
Thanks for the reply. It's been more than 3 hours now. The status is same.
Does it take so much time for a small 2 peer blockchain with just 2 transactions.
This can't be the explanation because syncing is much faster than this.
0 votes

The most likely explanation is that your nodes are simply not connected to each other. You can use getpeerinfo to confirm this. In general, once nodes have connected to each other, they will stay connected, even between restarts. But if there is some firewall preventing this, or if both node changed IP addresses and can no longer find each other, you need to connect them again explicitly. You can do this using the addnode API.

If your nodes are connected but are not sharing blocks, you may be experiencing a bug that we fixed a while back during the beta period, and you should be sure you're running the latest version of MultiChain.

answered Nov 2, 2017 by MultiChain
I can see the peers on each node. The firewalls are turned off and nodes could connect to each other.

  Node 1:       
[
    {    
        "id" : 5,                                                                                                                                        
        "addr" : "172.17.10.69:35953",                                
        "addrlocal" : "172.16.110.64:4781",


  Node 2:
[
    {
              "id" : 1,
              "addr" : "172.16.110.64:4781",
              "addrlocal" : "172.17.10.69:35953",

The inflight section also doesn't show any nodes.


I downloaded my multichain from the below link which is mentioned in the official website Hope it has the fixes.
https://www.multichain.com/download/multichain-1.0.1.tar.gz


Are there any logs which I share to help debug the issue?
Thanks for the response.If you don't mind, the best thing is to stop both nodes, zip up the blockchain directory for each, and then send to multichain dot debug at gmail dot com. We'll then take a detailed look.
Sure, I will do that. Just to confirm, [root@chain2 ~]# ll ~/.multichain/ is the directory you are looking for? I have sent it on the mentioned email, please let me know if you need any further inputs. :)

Thanks
Thanks - we received it and will take a look.
Please see our answer above, about the system clocks.
+2 votes

We took a look. The problem it that the system clocks on the two nodes are far out of sync, so one is not accepting the other one's blocks, and this is the correct behavior. Please use ntp or another way to keep the clocks roughly in sync.

answered Nov 2, 2017 by MultiChain
Phew! thanks for the help. I synced the time and now it's working. There was a difference of just 2 mins on both the nodes. How does it work in a different time zones? I checks the timezones?

Anyway thanks again. Cheers.
Very good... Blockchain works with UTC.. so no time zones issues..
...