Previous Lecture Complete and continue  

  Running a blockchain node

Running a blockchain node

Well, Devil is in the details but getting started is actually simple. Kudos to the Ethereum developers.

Let's setup a new fully synced Rinkeby (Ethereum test network using Clique PoA protocol) node.

Rinkeby PoA implementation is much faster but significantly less secure, more centralised from the mainnet concensus PoW. Rinkeby manages to approve a new block every 15s.

Wou wou wou. What those words actually mean?

  • Rinkeby: name of the Proof of Authority test network
  • Node: basically a traditional server executing Ethereum client/server
  • Concensus: an algorithm defining how the transactions will be validated, appended, persisted in the database on every Node
  • Block: bunch of transactions in a complicated array dispatched around the wire between all the nodes of the network every 15s.
  • Transaction: don't think about a bank transaction. Blockchain transaction is a state change. Renaming owner of a smart contract from Alice to Bob? Changing balance of your account from 1ETH to 5ETH? Setting variable "foo" value to "foo_value_123" in your smart contract? That's a transaction.

You can read more about the Rinkeby PoA proposal here:

The above command will:

  • initialize new directory where all data will be stored in ~/.gophersland_ethereum_r1, the default would be: ~/.ethereum
  • start downloading the Ethereum history necessary to become a new fully valid, synced Node of the network
  • the communication will happen over port 30304
  • cache, kind of a buffer, will be set to 2GB, to speed up the sync process
  • additional RPC API will launch so we can communicate with our node through consoles, nice GUI over port 8546

Wait for few hours until the blockchain is fully synced. You will have to download ~20GB of ledger history. Current block number is: 3039786. On my AMD Ryzen 5 2600, 3.4Ghz the sync process took 3 hours. Meanwhile you can follow GophersLand on Twitter, tell your friends about it, checkout our Medium Blog or prepare a dinner, probably breakfast as well, go to gym... let's just say, blockchain is not the fastest database :)

Eventually the printed message will be:

  • INFO [<time>] Imported new chain segment count=1
  • INFO [<time>] Imported new chain segment count=1
  • INFO [<time>] Imported new chain segment count=1
  • INFO [<time>] Imported new chain segment count=1

Congratulation, you are now part of the blockchain revolution in less than 10mins!!!