Asset balances of other nodes

0 votes
How does a node maintain asset balances of other nodes? Suppose we have a 3 node setup, how will 1st node be able to know the asset balances of other nodes - does it keep it as a property in its local data or does it calculate by reading whole of the transaction history of the other node?

I assume during verification of the transactions in a block, a node will require the asset balances of other nodes.
asked Aug 1, 2016 by amanc

1 Answer

0 votes
Generally there is no concept of node balances, it is actually the asset balances of addresses. When using the command ex: gettotalbalances the output is the combined asset balances of all the address (managed plus watch only) present in the nodes wallet.
answered Aug 2, 2016 by 7sigma
Yes I mean address balance only, assuming every node has a single address and no watch address.
In this context, a node would not be able to know the balance of another node. The way to achieve it is only by importing the address of other nodes in the nodes wallet and further checking the imported address balances.
In the verification process, the node core protocol checks if the transaction is valid by checking if the referred input transactions are still unspent and that the spender is able to assert the ownership of address and verify the output script rules. In short, I meant in the verification process balances are not required to be checked in the Multichain as it is based on the UTXO model adapted from Bitcoin. The sum of all the assets in the inputs should be equal to the sum of output assets in a transaction.
...