Forum for discussion of mid, final term and final project

Problems with geth

Problems with geth

di ALDO D'AQUINO -
Numero di risposte: 2

I'm trying to test the project on the testnet via geth instead of simulating rpc with ganache-cli.

The problem is that geth is taking too long to synchronize (days, probably weeks).

I also tried to use infura.io but it seems not to have HTTP-based API for watching events.

How can I do? I'm using the Web3j framework for Java.

In riposta a ALDO D'AQUINO

Re: Problems with geth

di DAMIANO DI FRANCESCO MAESA -

Geth will inevitably take some time to synchronize on Ropsten. You can test your application on a local testnet you set up (so just your node in localhost) while you wait for geth to synchronize and use teh fast sync option when starting geth to make teh process take way less time. Just as refernce, a new fast sync takes less than five days on our standard machine.

In riposta a ALDO D'AQUINO

Re: Problems with geth

di ALDO D'AQUINO -

SOLVED

It requires 10 days 24-hour to sync with fast sync. It first download block, more or less 3.7 million, then start downloading states, certainly more than 40 million, probably more than 50 million.

Start sync with geth --testnet --syncmode "fast" --rpc --rpcapi db,eth,net,web3,personal.

You can check the sync status attaching to the console: geth attach http://localhost:8545 and typing eth.syncing. false means the sync process is ended and the blockchain is ready to use.