How to Become a Validator on Starknet (Phase 1): A Step-by-Step Guide

This guide is designed to help anyone embarking on the journey of becoming a validator for the Starknet blockchain through native staking.

DarkCenobyte
9 min read3 days ago

--

The target audience for this guide is both novice solo stakers and validation node professionals approaching Starknet for the first time.

As a reminder, this guide is written to target Phase 1 of Starknet staking (see the tweet below), and there are likely to be significant changes with the arrival of Phase 2.

Now let’s jump into it!

The full-node installation

As mentioned in the official documentation, to become a validator, you need to run a full-node.

In fact, this prerequisite is not currently verifiable, but as it will undoubtedly be required for Phase 2, you’ll need to have one!

I’m using Juno, which I chose because it’s developed by Nethermind, a name that will probably ring a bell to anyone who’s ever managed an Ethereum node. After Geth, it’s the most widely used Ethereum node client, so the reputation of the company behind it is, to me, a proof of reliability.

For the Juno installation, you can follow the Juno documentation here: https://juno.nethermind.io/ .
As I write this guide, the requirements are as follows:

Minimal requirements:

CPU: At least 2 cores

RAM: 4GB or more

Storage: 250GB or more (SSD recommended; note: storage needs will grow over time)

Recommended requirements

CPU: High-performance CPU with 4 or more cores

RAM: 8GB or more

Storage: High-performance SSD with at least 250GB to accommodate future growth

Personally, I use a more powerful server with almost 2TB of NVMe storage and 32GB of memory, just in case… (and I got it for a good price). Although Starknet is far less hardware-intensive than other blockchains at the moment, only time will tell what Starknet will look like in a few years!

You get 4 official ways to install the full node:

  • Docker container
    You need to install Docker, and pull the image/…, it’s easier to update and install I guess (once Docker works on your system)
  • Standalone binary
    You manage the binary your own way, it’s my choice, but you’re free to use the solution that suits you best, as understanding how work your Linux is a pre-requisite for this one.
  • Source-code
    You can compile the whole client from source before running it… I think this is the most “expert” method, unnecessary though if you trust the binaries and don’t need to alter the source code… (So only if you know what you’re doing…)
  • GCP image
    Maybe the easiest way and there is a full page for this one on the official documentation, but it won’t be the cheapest, as you’ll need to use an instance on Google Cloud.

As I’m using the Standalone binary way, here is a step-by-step guide (using a Linux system like Ubuntu 24.04):

curl -LOJ https://github.com/NethermindEth/juno/releases/download/v0.12.4/juno-v0.12.4-Linux-x86_64.zip
unzip juno-v0.12.4-Linux-x86_64.zip
sudo mv ./juno-v0.12.4-Linux-x86_64 /usr/local/bin/juno

(Please adapt this with the latest link and the correct versions/filenames)

  • These commands will download the Juno client, extract the zip, then move the executable file into /usr/local/bin that should be in your $PATH in most Linux distribution.
  • Check the successful installation using this command:
juno help

This should answer something like this:

Starknet client implementation in Go.

Usage:
juno [flags]
juno [command]

Available Commands:
completion Generate the autocompletion script for the specified shell
db Database related operations
genp2pkeypair Generate private key pair for p2p.
help Help about any command

Flags:
...

If everything is fine, you have install correctly the binary!

To sync your node faster, download a snapshot to your server. (To be safe, ensure you have at least 500GB of free space!)

To do so, perform the following commands:

wget -O juno_mainnet.tar https://juno-snapshots.nethermind.dev/files/mainnet/latest
mkdir -p $HOME/snapshots
tar -xvf juno_mainnet.tar -C $HOME/snapshots

(If you want to store your database elsewhere or use a different Linux user, replace “$HOME/snapshots” with the desired path)

Even though Juno can currently run without an ETH node, it’s good practice to use one or at least an Infura API/Metamask Developper (you can use the free “Core Plan” for this purpose)

If you don’t have your own ETH node, here is how to use Infura API:

Create an API Key, for the Ethereum “Main” endpoint, and in the “settings” menu, enable the option “Require API Key Secret for all requests”.

Then copy and keep the API key (on the top of the page), we will use it later.

Reveal and keep the API Key Secret too, for the next step.

As you would like to let your node run in background, start automatically with the system, … Often Linux distribution use “systemd” to perform these tasks.
So to help you manage the node more effectively, I’ve created a systemd service that allows you to start, stop, restart, and enable your Juno client to run at startup:

[Unit]
Description=juno
After=network.target

[Service]
Type=simple
User=<juno-user>
ExecStart=/usr/local/bin/juno --db-path <juno-path> --eth-node wss://<ethereum-node>
Restart=on-failure
RestartSec=10
LimitNOFILE=50000

[Install]
WantedBy=multi-user.target

Copy this into a new file in /etc/systemd/system/juno.service
Then replace the following into this file:

  • <juno-user> by the linux user that will execute the node
  • <juno-path> by the path you will store the database (following the official documentation it should be /home/<juno-user>/snapshots/juno_mainnet (with <juno-user> being your current user)
  • <ethereum-node> with a websocket url targeting an RPC node, if you used Infura, this should look like:
    wss://:<infura-secret>@mainnet.infura.io/ws/v3/<infura-apikey>
    (with infura-secret and infura-apikey, get from the previous step)

Now you can perform the following commands:

sudo systemctl start juno
sudo systemctl status juno
sudo systemctl enable juno

The first command starts juno.
The second command shows you if juno started correctly and is running.
(you should see: “Active: active (running)”)
The third command configures Juno to start automatically at system startup, so it will be started automatically after a server reboot.

Important Reminder: all the above is valid at the time of writing, but please note that managing such an early node in the development of Starknet also means being able to read the documentation and follow new features, updates and evolutions that may or may not be breaking-changes!

The staking

At this time of phase 1, staking is only an interaction with two smartcontracts, the contract of STRK token and the staking contract.

First, you need to have 3 addresses, you can use your current Starknet wallet (Braavos, ArgentX, …) to create additional accounts.

  • The “staker address”: It’s the one who need to hold at least 20 000 STRK for the process. It is an important one, as it will appear as the “validator address” on validators lists for now.
  • The “reward address”: It’s an address that will receive the staking rewards when you claim it.
  • The “operational address”: It’s an address that will be use during Phase 2, it will be in-charge of producing transactions from a server hosting (or connected?) to the fullnode, we currently don’t have more informations about it.

The reward and operational addresses should be modifiable later using the staking contract, but you need to have these right now anyway.

Once you have these addresses, use the one containing the 20 000 STRK and, using an explorer such as voyager.online or starkscan.co, navigate to the smart contract of the STRK token: 0x04718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d

On these page, connect your wallet, then go to the “approve” method:

Screenshot of the “approve” method on both explorer

In the “spender” field, you will need to write the staking smartcontract address, that you can found here: https://docs.starknet.io/staking/overview/#staking_contract

The staking contract address is the highlighted

⚠️Why I didn’t copy it here directly? Because this is an extremely sensible step, so please ensure you are getting the address from the official documentation. You must understand exactly what this step means:

By using “approve” method, you are allowing an address (the spender one) to do whatever he want with your STRK, and some malicious actor could easily STEAL your STRK by telling you to do this!

This method is however massively used in all dApps of many blockchains, for example in DEX/Swap, it’s the step where you allow your source token, to be exchanged, before doing the real swap transaction.

So in the current situation, you are allowing the stake contract to take your STRK, then stake them to create your validator.

In the “amount” field, you need to put the amount of STRK you will let the staking contract take (so basically, how much STRK do you want to stake), tldr: for 20 000 STRK, put here: 20000000000000000000000

Explaination: Decimals are not stored as amount in smartcontracts!
This is something known by developers making calculations with decimals, you can get incorrect results due to some technical limitations, EVM and Starknet avoid it with the smart and easiest solution: storing only integers (and set a read method named “decimals()”), so basically when your wallet show you a token with an amount like “1.337”, your wallet is asking to a smartcontract your amount (as an integer), then asking to the contract its decimals value, and perform: amount*10^-decimals (for example with 1.337 of a token with a decimals of 6, it’s: 1337000*10^-6 = 1.337)

So in our case, as we are dealing directly with the STRK smartcontract and its decimals is 18, you need to use for 20 000 STRK:
20000*10¹⁸ = 20000000000000000000000

Carefully review the data you wrote in the two fields, then submit the transaction.

Once the transaction is done, we will go to the staking contract on an explorer, using voyager.online or starkscan.co again.

Now, we will use the “stake” method, to create our validator, there are more fields to fill here:

Screenshot of the “stake” method on both explorer

In the reward_address field, write your reward address (starting with 0x) created before, that will receive your rewards each time you claim them.

In the operational_address field, write your operational address (starting with 0x)

In the amount field, write the same value as in the previous step! (so if you allow 20 000 STRK, it’s 20000000000000000000000)

In the pool_enabled field, you can write “0” or “1”:

  • if you set “0”, nobody will be able to delegate to your validator! (this could be for legal reason in some countries)
  • if you set “1”, everybody will be able to delegate some STRK to your validator then receive rewards (and depending of your next field value, you will be able to get additional rewards)

In the commission field, you can write any value from 0 to 10000, this will be the “percentage” of commission you earn when users delegate STRK to your validator, again there is a decimals notion here, as you set here a percentage between 0 and 100%, this is a decimals value of 2, so if you want a 5% commission, you need to do 5*10², so write 500, if you want a 10% (10*10²) write 1000, …

⚠️WARNING! At the current commission implementation, you can only decrease the value you put here, but not increase it! So if you set commission = 0%, your validator will be stuck with a 0% commission!

Carefully review the data you wrote in the fields, then submit the transaction.

And voilà, congratulations! You are now a staker on the Starknet blockchain. This is how you become a validator during Phase 1!

Register information about your validator on the validator lists

If you go on validators list like:

You will see that some validators have names, logos, … and some have only their staker address:

As we can see here, being only an address is not very attractive if you are a delegator

So, if you expect to get delegator, you need to fulfill some forms, here is the 3 mains currently (corresponding to the 3 validator lists above):

Fill out these forms correctly. When asked for an address, ensure you write at least your staker address (the one holding the 20,000 STRK and performing the “stake” call). This is the one these websites use to attach your information to your validator.

Remember, the success of a blockchain like Starknet is mainly the community, so contribute on the officials Discords, Telegram, … and share knowledge! 😊

If you found this guide helpful and would like to support me, please consider delegating to my validator using one of these links:

Resources:

--

--

DarkCenobyte
DarkCenobyte

Written by DarkCenobyte

French AWS cloud architect, NodeJS developper and also crypto-enthusiast.

No responses yet