2

In the context of building DApps, Can a DApp have access to any account across the network (any given node)? Or just the accounts created for the Node it "points" to?

I guess this is another way of asking if accounts are global? For example, when I create a new account using Geth, is that Account replicated across the entire network?

I appreciate all the answers, I'm kind of confused as a beginner that I still in the world of Ethereum.

Cheers!

3

Private keys are paired with public keys. You need to keep your private key private because if other people get it, they can simply steal your money. You may share your public key with anyone and in fact, you do this so they can send you money. The private key is a file stored locally on your own computer (or, if you're using an exchange, the exchange stores it). You need your private key to interact with your account. If you copy the private key to another computer (that is also running a node), you can use that account from that computer as well.

Many people also refer to the 'public key' as an 'account.' It's always frequently called an 'address.' An 'address' is a 20-byte value starting with 0x. You've probably seen it called your Ethereum address. When you interact with a dApp, you send ether and/or commands to the dApp's address.

The balance of your Ethereum address and all the transactions ever cast against that address are duplicated across every Ethereum node. In fact, coming to agreement on the validity of transactions is exactly what the Blockchain does. When you hear the words "coming to consensus" the thing the nodes are coming to consensus about is the history of transactions on all the accounts (and thereby the account balances).

Smart contracts are addresses (just like any other address) with the special property that the address holds code). You interact with dApps by sending transactions to its address. In that sense, dApps have access to any account that sends transactions to it (but dApps can't control your accounts in any way).

Summary: accounts are global in that every node duplicates every transaction on all accounts (address). They are not global in the sense that only you hold the private key, and only you can sign transactions from that account.

  • Fantastic answer! Truly priceless. As a follow up Question, Is it possible to perform exchanges from Ether to BitCoin using a Smart Contract? – jlstr May 24 '18 at 1:08
  • 1
    Ask a new question, so others benefit from the answer. – Thomas Jay Rush May 24 '18 at 11:46
  • done, sir. ethereum.stackexchange.com/questions/49433/… – jlstr May 24 '18 at 20:29
2

No all accounts are not available on every node in the network. Account information is stored locally in key files and node does not broadcast account keys to all the nodes participating in network. You need to have private key and passphrase of ethereum account with you and you can import that account that account on any ethereum node and unlock it.

  • Yes, this is the behaviour I notice. So, if the accounts(public-keys) are not propagated how the transactions can be verified by other nodes? – Nambi Nov 7 '18 at 19:12
  • Refer the following article medium.com/blockchannel/…. – Soham Lawar Nov 9 '18 at 6:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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