Duplicate node (wallet) in a network

+1 vote
Hi.

Is it possible to run two nodes in a network that share the wallet?

That means: Create first node, create second node, import wallet from first to second node...

 

My implications:

1. This should not have any impact on the consensus algorithm (51% attack or similar stuff) since this two nodes appear to be only one from the perspective of the network, right?

2. Are the new addresses generated from a wallet deterministic? So do the depend only on the initial address / key? That means: if I restore a wallet and do a getnewaddress, will I get the same set of addresses as before?

3. A problem would probably be to sync the wallet.dat. So for example if I call getnewaddress on one of the two nodes, the other node should also have this address available. I think this would be the biggest problem.

4. What should not work: sending a transaction to both nodes, because this would be stored on the blockchain twice, right?

5. Is there some problem with some kind of sequence id? So that the same wallet / address sends transactions to the network with non-matching sequence-ids?

 

The idea behind all of this is to get a better reliability, so if one node crashed / gets disconnected / hardware error or whatever, there should be a spare node so there can directly be a failover.

 

Any experiences with that?
asked Oct 19, 2017 by Alexoid

1 Answer

0 votes

For a general answer, please see section 5 of this answer:

https://www.multichain.com/qa/3254/back-up-and-recovery-best-practices?show=3261#a3261

Some more specific responses:

1. Correct – no effect on the consensus algorithm.

2. The address generation is not deterministic (although that's an interesting idea for us to consider in future) so you would need to use dumpprivkey/importprivkey for each new address.

3. See 2.

4. No problem sending a transaction to multiple nodes simultaneously, so long as the transaction is really identical (i.e. the same txid). In a peer-to-peer network transactions propagate in multiple directions anyway.

5. There's no sequence ID in the MultiChain architecture, but there is a risk of double spending the same UTXO. So unless you manually manage unspent outputs you can't use this kind of setup for load balancing. But you can use it for failover. In other words, only create transactions through one node at a time.

answered Oct 19, 2017 by MultiChain
...