EatTheBlocks Forum

What exactly is the role of Geth?


First of all, excuse me for my English, it is not very good :slightly_smiling_face:

I’m currently learning how to develop smart contracts and how they communicate with a dapp.
The role of Web3 is pretty clear to me but I hear about Geth (Go Ethereum) and I can’t figure out what it is for.
Would you have a link that would explain simply how Geth is articulated with Web3, a Dapp and my smart contract?
I’m progressing step by step and now I’m mainly interested in developing a Dapp that interacts with my smart contract. Is Web3 enough for that ? Or should I also use Geth?

Thank you very much for your help!


Thanks for the question. I was not even aware about Geth. I just made quick research on Geth.
In my understanding Geth is used to create an ethereum (test or mainnet) node on your computer. Imagine, you want to deploy your smart contracts on Rinkeby. I think you can it in two ways at least:
using Infura and using Geth.
This youtube video explains about Geth. I don’t see any direct relation between Geth and Web3.js.

Please research about Geth and share what you understand about it.

Hi prolingua!

What I have understood about these different components:

  • Truffle is used to compile, test and deploy smart contracts on the blockchain.
  • Web3.js or Ethers.js are libraries used to interact with smart contracts from JavaScript.
  • Geth and Parity are both ethereum nodes that allow to fully manage a node and, in dapp development, to connect to the network.
  • Infura or Alchemy are both services that provide nodes (so don’t need to host it yourself with Geth!). With Infura or Alchemy, we have to use Web3 or Ether libraries as a provider.
  • Ganache allows to run an entire network on local machine.
    And yes, it seems possible to use Infura or Alchemy for deployment too.

It becomes clearer for me :slight_smile:

Well done.
I just want to comment on this one:

  • Ganache allows to run an entire network on local machine.

With ganache-cli you can fork (fork means copy, basically) the Ethereum mainnet to your local machine. There are times when you want to this. Imagine you want to develop a smart contract which accesses another smart contract on the mainnet. In this case, you need to fork the mainnet.

Yes, you’re right !
Thank you for your help :slight_smile: