Can not see actual balances of other nodes

+1 vote

Dear community,

 

I have executed the Asset issuance tutorial and created 50,000 GBP in my 3-node blockchain.

Then I transferred 1 GBP to node2 and 10 GBP to node3 from node1, who owned all 50,000 GBP.

If I look at the assettransaction (10 GBP from node1 -> node3) by using the hexID, I get the following result:

{"method":"getassettransaction","params":["GBP","feccedfa3cb8cf6b27d1c59035f588c77c7d2bfd557fa3623aac286f3342d178"],"id":1,"chain_name":"chain1"}

{
    "addresses" : {
        "12jL17GydyQJJSxtUpmPZkCCMeficF8Gm25DTK" : 10.00000000,
        "16ogm231WCPeAyxFFkv65RBhqiHoNwLvVKis5R" : -10.00000000
    },
    "items" : [
    ],
    "data" : [
    ],
    "confirmations" : 11,
    "blockhash" : "0013577dc1e160da990fa8b74c759de19de18efa317896feb5142f0992107d1d",
    "blockindex" : 1,
    "blocktime" : 1493231408,
    "txid" : "feccedfa3cb8cf6b27d1c59035f588c77c7d2bfd557fa3623aac286f3342d178",
    "valid" : true,
    "time" : 1493231393,
    "timereceived" : 1493231393
}

This statement can be executed from both node1 and node3, after subscribing to the GBP asset.

Here is my problem:

When executing getmultibalances * GBP on either of the nodes, I only see their own current assets, also summed up as total.

For example for node1:

{"method":"getmultibalances","params":["*","GBP"],"id":1,"chain_name":"chain1"}

{
    "16ogm231WCPeAyxFFkv65RBhqiHoNwLvVKis5R" : [
        {
            "name" : "GBP",
            "assetref" : "110-265-54370",
            "qty" : 49989.00000000
        }
    ],
    "total" : [
        {
            "name" : "GBP",
            "assetref" : "110-265-54370",
            "qty" : 49989.00000000
        }
    ]
}

I am a little confused, shouldn't I be able to see also the balances from node3 (10 GBP), and not only from myself node1?

 

Thanks for your help, I think I am missing something...

Nisse

 
asked Apr 26, 2017 by Nisse Knudsen

1 Answer

0 votes
 
Best answer

MultiChain applies the principle of selective attention, meaning that each node has a full record of the chain but only pays attention to those things it is interested in. This saves a significant amount of disk space (for indexes and caches) and processing time. So for example a node will not track the balance of an address that is not in its own wallet, unless you explicitly ask it to do so using the importaddress command.

answered Apr 27, 2017 by MultiChain
So how can we have a Highly available setup of multichain. If my node 1 goes down, all the wallets it holds is not available?
We have some draft documentation for this, which will be linked from the website menu soon, but still might undergo some final changes:

https://www.multichain.com/developers/clustering-nodes-high-availability/
Thanks, I could see this page is renamed and is available in the website.
https://www.multichain.com/developers/clustering-high-availability/

Can I consider this to be final one? At least theoretically or architectural things shouldn't change anytime soon. :)
Yes, this is the final version of the documentation.
...