Tutorial — How to install a node on the Starknet with Docker

Starknet Layer2

We are going to attack again the node on starknet because my old tutorial has become obsolete. We don’t have any info on the rewards yet, but we do have a few days that would suggest that the token launch is not too far away. Because StarkNet’s ERC20 token contract is deployed on Ethereum.

I am passionate about the world of blockchain and I would like to share my passion and research with you through my articles in giving you my perception and opening new doors to very early crypto projects.

Introduction to Starknet

Their scaling solutions use STARK-based validity proofs to ensure an Ethereum-secure, fast and seamless user experience. They support a range of data availability modes. StarkNet is a permissionless decentralized ZK-Rollup. It operates as an L2 network over Ethereum, enabling any dApp to achieve unlimited scale for its computation — without compromising Ethereum’s composability and security. Using SHARP (SHARed Prover) technology, their solutions offer the same low marginal gas cost per transaction to all applications, regardless of their size.

Create an account on alchemy

The Starknet network is a Layer 2 of the Ethereum blockchain so it is essential that your Starknet node communicate with the Ethereum layer to work. For that I recommend you to create an Alchemy account to use their Layer 1 Ethereum API

Click here to open an account on Alchemy and followed all 11steps one by one below - As usual, complete your account registration first - Click Create APP - Enter a name and description freely up to you - Then Click show details - Then Click show key - Then copy your HTTPS link into Note \

Preparation

  • We then proceed to update the packages :

sudo apt update && sudo apt upgrade -y
  • Wait for it to finish

  • The required libraries are installed with the following command:

sudo apt install pkg-config curl git build-essential libssl-dev

Press Y and then ENTER on your keyboard

  • Screen installation

    sudo apt install screen

When he asks you to press Y and then ENTER on your keyboard

Clone pathfinder github repository

  • Create a local copy of github repository with this command:

git clone --branch v0.4.2 https://github.com/eqlabs/pathfinder.git

If necessary replace “v4.2” with newer version if that exists. You can check here.

Execute your node with docker

  • Screen node

screen -S mynode

And finally you can launch your node with the following command with the API created via Alchemy

mkdir -p $HOME/pathfinder
docker run \
  --rm \
  -p 9545:9545 \
  --user "$(id -u):$(id -g)" \
  -e RUST_LOG=info \
  -e PATHFINDER_ETHEREUM_API_URL="Your_HTTPS_Alchemy" \
  -v $HOME/pathfinder:/usr/share/pathfinder/data \
  eqlabs/pathfinder

Below you will find a real example:

mkdir -p $HOME/pathfinder
docker run \
  --rm \
  -p 9545:9545 \
  --user "$(id -u):$(id -g)" \
  -e RUST_LOG=info \
  -e PATHFINDER_ETHEREUM_API_URL="https://eth-mainnet.g.alchemy.com/v2/XxxxxxxxxxxxxxxxxxFK" \
  -v $HOME/pathfinder:/usr/share/pathfinder/data \
  eqlabs/pathfinder

Congratulation your node is running!

Press CTRL+A+D Anytime you want to close the log!

Check the progress of the synchronisation of your node

Wait a moment (5 minutes) and go back to your Alchemy account dashboard

  • To check the progress of the synchronization you can use the command below:

screen -r mynode

So you can see in the image above that your node is synchronising with the blockchain. For it to be fully synchronised it needs to scan all the blocks up to the last one.

To know the exact number of blocks already generated on starknet you can go directly here.

Make sure you are on the Mainnet and not the Goerli In my case there are 10k++blocks! Congratulations your node is now with the starkware blockchain!!!!

Tweet your screnshot and send on official dicord in “the full node success” section with the link to your tweet.

✅ Done

Last updated