Go-Ethereum in the Big picture

Shahir Zain
Coinmonks
3 min readAug 21, 2022

--

If you are Blockchain enthusiasts you probably hear about geth or go-Ethereum. But what is geth?

Geth Ethereum is the command-line interface for implementing an Ethereum node in Google’s Go programming language. Geth serves as a node in the blockchain that helps the user mine Ether and creates software that runs on Ethereum Virtual Machine.

Let's say you download Geth or go-Ethereum, Geth is one of many different BlockChain nodes. Geth is a command-line tool. If you run two things happen,

  • Geth tries to find our blockchain node and connect to them.
  • Geth opened JavaScript RPC on your computer to let you connect to the blockchain node.

It will start connecting to other nodes and start downloading blocks. The download works a bit like a torrent. There are several ways how Geth is synchronized. Listed below:

  • Full sync
  • Fast sync
  • Light sync

Full Sync

If you run your PC as a complete client or Full Sync It will download all Block Headers, Block Bodies, and Historical Transactions. They all can be millions of gigabytes of data. It also needs lots of bandwidth to download these blocks.

Fast Sync

Fast Sync also downloads all the Block Headers and Block Bodies but It will only process the last 1024 transactions. It is comparatively much lighter than the Full Sync.

Light Sync

It will download only the Header and takes the latest snapshot. It is less secure but much faster.

When you download and install Geth on your PC, You can create an account, You can send transactions, can Sign transactions, and lots of other things. Geth support JSON-RPC over HTTP. There are different ways to reach this JSON-RPC list below:

  • IPC — Inter-Process Communication
  • RPC over HTTP

IPC — This is related when you are directly connecting to the Geth via file or Pipe

RPC over HTTP — This way you can connect with HTTP which enables your browser to connect. This is where WEB3.JS comes into play.

WEB3.JS — This is a very simple JavaScript library. It takes commands and reroutes them via HTTP to the Ethereum node that is open over HTTP-RPC. Let's say you have a website and that website uses WEB3.js and you also have a Geth node running and you want to know the account in that Geth node. You typed the below command to get that account

WEB3.JS will connect to the blockchain like Geth via HTTP-RPC in the background via AJAX. It will return the value of the script, just like interacting with any other HTTP API. In this case, you are interacting with the blockchain node directly.

Download Geth

You have to go to https://geth.ethereum.org/ now to retrieve the current version number. As a reminder Geth does not have an upgrade mechanism so you have to check from time to time for the newer version. After installing you didn't find it in your menu because Geth is the command-line tool so go to your terminal and type “geth” and it will start the Geth application. For the very first time, It will import all the blocks from the network to your computer. It is in by default in Fast Sync mode. You can configure your geth mode to full sync or light sync its up to you.

I haven’t covered All the concepts but It may be a good start for the one who just started learning geth.

That’s it, folks! hope it was a good read for you. Thank you! ✨

👉 Contact me: shahirzain100@gmail.com

👉 Follow me: GitHub LinkedIn

New to trading? Try crypto trading bots or copy trading

--

--

Shahir Zain
Coinmonks

I am a tech enthusiast and a visionary person and have been in the software industry for the last 3 years, I believe in sharing knowledge with each other.