0

I already have Ethereum Wallet installed and synced, fully working. But I am working on a cryptocurrencies-based project and I needed the JSON-RPC, so I installed Geth.

However Geth seems not to be using Ethereum Wallet's downloaded blockchain and wants to sync again.

Machine Info

Mac OS X 10.12.6

Ethereum Wallet 0.8.10 (I had to downgrade from 0.9.0 because of this bug)

Geth 1.6.7-stable

Steps to reproduce

  1. Run Ethereum Wallet, wait until it syncs, choose it to run on the testnet (Ropsten), get some funds on the main account.

  2. Close Ethereum Wallet and run Geth by using the command line: geth --networkid 3 --rpc --rpccorsdomain "*"

  3. Open Ethereum Wallet. Notice that the balance is 0 and the initial block is 0.

  4. Run the following Javascript in the console of a page where web3 is loaded:

var web3 = new Web3(new
Web3.providers.HttpProvider("http://localhost:8545"));

web3.eth.accounts
> ['0xFa737A47e7AfE7910Faa0b86ebc2C2b2FbEFAc2b']

web3.eth.defaultAccount = web3.eth.accounts[0];

web3.version.network
> "3"

web3.fromWei(web3.eth.getBalance('0xFa737A47e7AfE7910Faa0b86ebc2C2b2FbEFAc2b'),'ether').toString(10)
> "0"

web3.eth.getBlock("latest").number;
> 0

Expected results

On the steps 3 and 4, the balance shouldn't be 0, as there are funds on that wallet.

Therefore:

  • Is it possible to make Geth to use Ethereum Wallet's downloaded blockchain data, instead of downloading a duplicated copy again?

  • Is it possible to make Ethereum Wallet (Mac OS X version) serve the JSON-RPC through its internal Geth, so I don't need to use the separatedly-downloaded Geth?

0

Although it lacks lot of docs about it, I solved my issue by using IPC instead of RPC.

  • You also could have change the default directory of the chaindata to the one used by your ethereum wallet – Florian Castelain Jan 23 '18 at 6:05

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.