How nodes connect and link between nodes

+2 votes
I dont think i understand the link between nodes correctly.

Just some background info on what im trying to do:

If i have 3 nodes and all 3 are equal peers.

I create addresses on one of these nodes that i treat like a 'master node' and all my assets are on this 'master node' as well.I move my assets between these addresses and assets on this 'master node'. Should this 'master node' crash or die or be hacked. I cant use one of the peers to continue the work that was done by my 'master node' as the peers do not posses the private/public key pairs that the 'master node' had control over.

I am simulating a wallet scenario like where i have one 'master node' who knows all addresses and each user gets a new address from the 'master node'. Then i issue assets from the 'master node' to these addresses on this node.

I only use the peers to mine and to sync data between them.

I can use importaddress but this only gives me a watch on those addresses but not the keys. I understand this is a security mechanism but I'm not sure how the nodes are all equal and they replicate the data/address/balances and the blocks among them.

So my question is,

a) What do i do in a case where my 'master node' is no longer usable in any circumstance be it a hack/crash/corruption?

b) Why cant i just fallback onto one of the peers and let them continue the work the 'master node' was doing?

Instead of having to be forced to either keep a hard backup of that node or recreate all blocks for that 'master node'.

I know there is no concept of a master node in block/multichain but I'm not sure how else to refer to this node which knows this type of information.
asked Aug 4, 2017 by RobertJ

1 Answer

+1 vote
Best answer

First I would say that if all your keys are held by every node, then it's not a classic blockchain use case – in general the idea of a blockchain is to divide control over things between multiple nodes.

Second if you do want to share private keys between nodes (so that each of them can transact on behalf of the same address) you can use the dumpprivkey / importprivkey mechanism.

Finally please be aware that this setup should be used in a failover rather than a load balancing pattern. If you are creating transactions from an address simultaneously in two nodes, there is a strong likelihood of a "double spend" event where both nodes are trying to spend the same previous UTXO (unspent transaction output). Unless you want to get into manually managing UTXOs using createrawtransaction, you should stick to sending transactions from one node at a time.

answered Aug 5, 2017 by MultiChain
selected Aug 7, 2017 by RobertJ