0

When you create a wallet file, can you use the same address on both main net and test net? I understand the same address will have different funds on each network, but does the address exist on both?

Ive been looking into web3j, and Im not sure how the create wallet functionality works without a web3j parameter to connect to the network

2

Address are not really created. They exists since the very beginning of the chain. However, people claim ownership of addresses. For example, when you create a wallet in myetherwallet, you don't really create it, you get the address corresponding to the password you indicated (trhough a complexe algorithm to build private key, then public key then the address itself).

  • When you create a wallet file, can you use the same address on both main net and test net?

If you mean the keystore file, yes. The keystore file is just your private key encrypted.

  • I understand the same address will have different funds on each network, but does the address exist on both?

Addresses exist all the time. You just take ownership of it.

  • Ive been looking into web3j, and Im not sure how the create wallet functionality works without a web3j parameter to connect to the network

I have not used web3js this way, so I don't really know. According to the documentation, I would say it is not possible. But I am pretty sure other librairies can do that.

  • So then is it true that if I create an address on mainnet, I can use that same address on testnet? Of course the funds will be different, but does it work this way? – yemista Jan 12 '18 at 14:07
  • I don't really think it is this simple. This goes beyond my understanding. But honestly, just claim a new address on testnet, it's easy and takes you a few seconds – Florian Castelain Jan 13 '18 at 3:44
  • @Andromelus So, I am just learning this stuff, but what you are saying makes perfect sense. However, what I don't understand is that if all addresses exist, and these addresses are derived from private keys, isn't it POSSIBLE (however infinitely unlikely) that I could happen to generate a private key where the address derived from that private key corresponds to a deployed contract? If that happens, wouldn't I have access to the funds stored within the contract using the private key? – tylerism Sep 11 '18 at 17:17
0

In Ethereum, there is a database which is called Patricia tree. This tree store all network addresses. An address is added to this tree when it received some ether.

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.