Back
Featured image of post Running an Ethereum Rinkeby full node in 2022

Running an Ethereum Rinkeby full node in 2022

A guided tutorial on how to setup and run Ethereum Rinkeby node on 2022

Table of Content

What is Rinkeby Testnet

Rinkeby is an Ethereum test network that allows for blockchain development testing before deployment on Mainnet, the main Ethereum network.

The Proof-of-Authority test network was established in April 2017. It uses the Clique PoA consensus protocol, and is maintained by the Geth developer team.

The network is supported by Geth, Nethermind and Hyperledger Besu.

Some features of the network are:

  • Testnet / Live: Test
  • Chain ID: 4
  • Network ID: 4
  • Live Since: April 2017
  • Block time: 15 seconds
  • Consensus / block proposer: PoA – Proof-of-Authority
  • Permissioned: Yes
  • Governance / Authorities: Known developers who sign the blocks

Meaning of PoA:

Rinkeby doesn’t run Proof of Work, it runs Proof of Authority. This means there are no miners. The people that create blocks are pre-authorized nodes. It’s a network where pre-selected and trusted people are allowed to create the blocks.

Why do we need testnets like Rinkeby?

Before a project launches on the Ethereum blockchain (or before changes are made to the blockchain itself), a version is deployed to an Ethereum Test Network (“testnet”), which simulates Ethereum — this gives developers, the community, and you a chance to kick the tires before real assets are involved. Ether and tokens on a testnet are easy to obtain, and carry no real-world value — still, it can be fun to own 10,000 Ether or a trillion tokens on a testnet.

Testnets

There are three testnets currently in use, and each behaves similarly to the production blockchain (where your real Ether and tokens reside). Developers may have a personal preference or favorite testnet, and projects typically develop on only one of them.

  • Ropsten: A proof-of-work blockchain that most closely resembles Ethereum; you can easily mine faux-Ether.
  • Kovan: A proof-of-authority blockchain, started by the Parity team. Ether can’t be mined; it has to be requested.
  • Rinkeby: A proof-of-authority blockchain, started by the Geth team. Ether can’t be mined; it has to be requested.

Steps for synchronizing a Full Node in Rinkeby

A full node lets you access all state. There is a light node (state-on-demand) and wallet-only (no state) instructions as well, and these are even faster. I’m using this for dapp development, so I want access to all state.

Before running a FULL node, make sure your current hardware can support it. The documentation states the following:

A full node synchronizes the blockchain by downloading the full chain from the genesis block to the current head block, but does not execute the transactions. Instead, it downloads all the transactions receipts along with the entire recent state. As the node downloads the recent state directly, historical data can only be queried from that block onward.

Initial processing required to synchronize is more bandwidth intensive, but is light on the CPU and has significantly reduced disk requirements. Mid range machines with HDD storage, decent CPUs and 4GB+ RAM should be enough.

Download Geth

First, install the latest geth version to your machine. For Ubuntu, you can follow the instructions on the official wiki.

1
2
3
4
sudo apt-get install software-properties-common
sudo add-apt-repository -y ppa:ethereum/ethereum
sudo apt-get update
sudo apt-get install ethereum

If you’re just upgrade geth from a previous version, you can just run

1
sudo apt install -y geth

Start geth for Rinkeby Testnet

To run a FULL node, start Geth with the Rinkeby flag

1
geth --rinkeby

After running geth, it will start the syncronization process of downloading previous blocks. Standard output logs should look like these

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
ze=26.96MiB
INFO [03-05|17:40:43.021] Imported new block receipts              count=35   elapsed=180.925ms number=10,122,322 hash=7ef043..cb2bc7 age=3w6d2h    size=10.33MiB
INFO [03-05|17:40:46.709] Imported new block receipts              count=37   elapsed=147.743ms number=10,122,359 hash=baee14..59eb60 age=3w6d2h    size=11.06MiB
INFO [03-05|17:40:47.116] Imported new block receipts              count=34   elapsed=124.763ms number=10,122,393 hash=af8329..1f4123 age=3w6d2h    size=11.07MiB
INFO [03-05|17:40:47.578] Imported new block receipts              count=35   elapsed=141.193ms number=10,122,428 hash=c5aabf..bc3ab1 age=3w6d1h    size=9.86MiB
INFO [03-05|17:40:48.050] Imported new block receipts              count=44   elapsed=162.263ms number=10,122,472 hash=173cae..1be7cd age=3w6d1h    size=11.31MiB
INFO [03-05|17:40:49.234] Imported new block receipts              count=8    elapsed=17.250ms  number=10,122,480 hash=185a26..26d615 age=3w6d1h    size=2.35MiB
INFO [03-05|17:40:50.208] Imported new block receipts              count=765  elapsed=526.828ms number=10,123,245 hash=68ab3e..eda777 age=3w5d22h   size=37.70MiB
INFO [03-05|17:40:50.568] Imported new block receipts              count=68   elapsed=36.988ms  number=10,123,313 hash=7286bc..c39c0d age=3w5d22h   size=2.78MiB
INFO [03-05|17:40:50.723] State sync in progress                   synced=43.42% state=38.18GiB accounts=6,019,352@1.23GiB slots=142,131,047@29.08GiB codes=1,160,508@7.87GiB eta=1h17m45.825s
INFO [03-05|17:40:52.332] Imported new block receipts              count=322  elapsed=203.823ms number=10,123,635 hash=d4f829..016e69 age=3w5d20h   size=13.99MiB
INFO [03-05|17:40:53.225] Imported new block headers               count=2048 elapsed=702.953ms number=10,161,539 hash=ebbebf..10688e age=2w6d34m
INFO [03-05|17:40:55.920] Imported new block headers               count=2048 elapsed=691.962ms number=10,163,587 hash=42a94f..895852 age=2w5d16h
INFO [03-05|17:40:56.064] Imported new block receipts              count=1140 elapsed=878.685ms number=10,124,775 hash=5b28a6..570969 age=3w5d16h   size=44.93MiB

You have to wait now, to a full syncronization. However, in the meantime you can open an interactive console connected to geth process via IPC and launch some commands. To do that, use the command below

1
geth --datadir=$HOME/.ethereum/rinkeby attach ipc:$HOME/.ethereum/rinkeby/geth.ipc console

On a successful execution, you shoud see a welcome message like this

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
Welcome to the Geth JavaScript console!

instance: Geth/v1.10.16-stable-20356e57/linux-amd64/go1.17.5
coinbase: 0x8163dfd2c2dcb1b9079075df37fad3aeec140b3c
at block: 0 (Wed Apr 12 2017 16:59:06 GMT+0200 (CEST))
 datadir: /home/r00t/.ethereum/rinkeby
 modules: admin:1.0 clique:1.0 debug:1.0 eth:1.0 miner:1.0 net:1.0 personal:1.0 rpc:1.0 txpool:1.0 web3:1.0

To exit, press ctrl-d or type exit
> 

Check peer syncing status

To check the peer syncing status, we need to connect to the peer using previous command to open an interactive geth console and then type

1
eth.syncing

The response contains the current state of our peer.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
{
  currentBlock: 10276653,
  healedBytecodeBytes: 0,
  healedBytecodes: 0,
  healedTrienodeBytes: 0,
  healedTrienodes: 0,
  healingBytecode: 0,
  healingTrienodes: 0,
  highestBlock: 10276756,
  startingBlock: 9450883,
  syncedAccountBytes: 1475479684,
  syncedAccounts: 6733197,
  syncedBytecodeBytes: 9262134023,
  syncedBytecodes: 1268721,
  syncedStorage: 156218711,
  syncedStorageBytes: 34301295620
}

When the process ends, you can search for any available Faucet and request some ETH for testing purposes.

Conclusion

Movitated by the need to have a local copy of the ledger in my own machine so that I can research an analyze on existing data, contract, transactions, etc I show you in this article the steps required to do it by your own means. However take into account, that there is no real motivation for peer owners to do this process, since Rinkeby network has no mining process and does not reward people who contribute with nodes.

References



💬 Share this post in social media

Thanks for checking this out and I hope you found the info useful! If you have any questions, don't hesitate to write me a comment below. And remember that if you like to see more content on, just let me know it and share this post with your colleges, co-workers, FFF, etc.

You are free to use the content, but mention the author (@MrSergioAnguita) and link the post!
Last updated on Mar 10, 2022 16:58 CET
Please, don't try to hack this website servers. Guess why...