6

I'm running a private ethereum development network with 3 nodes connected to each other. Before asking my question, something about my setup. This is how I start those nodes:

geth --networkid 2345 --datadir /some/dir/01 --rpc --rpccorsdomain "*" --rpcapi "db,net,web3,miner,eth,personal" --port "30301" --rpcport 8101 --maxpeers 2 --identity "MyChain01" console

This is just the statement for one node, the others have different port numbers.

Once all nodes are up, I connect them within the JavaScript console via:

admin.addPeer("enode:1234567890.....")

and when running:

admin.peers

I'm getting the other peers accordingly. When I start mining on one node, the mined blocks get synchronized to the others, so it all works good.

Now here comes my question. Let's say I've created 2 accounts on Node01, 2 accounts on Node02 and 2 accounts on Node03. How could I actually do any transaction across nodes? So from account1.node01 to account1.node02?

When running:

personal.listAccounts

on any given node, I only get the accounts created on that very node.

Does anyone know if there is a solution to access all accounts from all connected nodes? Maybe I'm missing a trick here, but I couldn't really find anything that would explain how to do that.

Thanks, Borinho

1
  • Great Question, it clarifies one of my biggest doubts. I guess Accounts aren't "Global" as I thought. I was wondering if you could give me your opinion on my question (I'm hoping it's related): ethereum.stackexchange.com/questions/34964/…
    – jlstr
    Commented Jan 12, 2018 at 2:17

2 Answers 2

4

for all who maybe ask the same question I wanted to provide an answer to my question to my best knowledge.

What I basically described above is the concept of a "hot wallet". As, in the example above, the account is created directly at the node, all data, keys etc are stored on that node. Now as wallets, or containers of keys, should not (and I guess, cannot) be copied across nodes, the initial question is actually pointless or plain wrong. Another problem is that I actually asked two questions in one.

Transferring something from account1.node1 to account1.node2 is no problem at all (within the same network). Simply do:

eth.sendTransaction({from:sender, to:receiver, value: amount})

The other question I was asking myself was kinda along the lines of a blockchain explorer. Listing, via web3, what's going on in the network. With web3.js one can query all account data on any specified node, but not all accounts within a given private blockchain installation (unless someone tells me otherwise).

I hope that helps someone at some time :)

Borinho

3
  1. At the moment, there is no way you can access your account on another computer without adding your key files there. that's not immediately a risk, as they're still password protected, but.. you get it.

  2. But, there is a brain-wallet ( https://github.com/ConsenSys/eth-lightwallet ). What you can do with it: Create accounts on the fly, and use them just by identifying with that seed (consisting of 10 words generated by a special pattern), and a password, that you chose everytime you use the account in your browser(has nothing to do with an account password, as those 10 words are the only thing that matter ;) ) What you cannot do yet is transform your existing wallets into a brain wallet.

So if you want to have an account you can use everywhere without a keyfile, create some brain wallets and host the neccessary scripts online, so you can access them from everywhere. and of course write down those 10 words, as they generate the keys on the fly everytime you want to use this wallet.

  1. To find out all balances of all users would take a lot of mathematical work (track all transitions, the mined ether and so on untill way way back).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.