Running your Starknet full node
Overview
Welcome to the third installment of the Becoming a Starknet validator guide! ✅
To claim your staking rewards, you must run one of the various Starknet full node implementations. Starting from its second phase, the staking protocol also requires validators to prove they are actively preserving the history of the network by submitting attestations to randomly assigned blocks in each epoch. This installment of the series will therefore walk you though running a Pathfinder node and its attestation service.
Running a Pathfinder node
Downloading a snapshot
Running a full node involves using your local machine’s storage to maintain a full database of the blockchain, all the way from the genesis block.
Database snapshots let you quickly start your node without having to download all blocks from the very beginning, and instead use a pre-made version of the database that’s already in sync up to a certain block.
To download Pathfinder’s snapshot, you first need to download the rclone file manager by running:
sudo -v ; curl https://rclone.org/install.sh | sudo bash
This installation script can be used to install rclone on Linux/macOS/BSD systems. For other installation methods, see rclone.org/install. |
Once rclone is downloaded, create a new rclone configuration file:
touch $HOME/.config/rclone/rclone.conf
and add the following content:
[pathfinder-snapshots]
type = s3
provider = Cloudflare
env_auth = false
access_key_id = 7635ce5752c94f802d97a28186e0c96d
secret_access_key = 529f8db483aae4df4e2a781b9db0c8a3a7c75c82ff70787ba2620310791c7821
endpoint = https://cbf011119e7864a873158d83f3304e27.r2.cloudflarestorage.com
acl = private
Next, create a new $HOME/pathfinder
directory, navigate into it, and use rclone to copy Pathfinder’s latest database snapshot to your local directory by running:
mkdir $HOME/pathfinder
cd $HOME/pathfinder
rclone copy -P pathfinder-snapshots:pathfinder-snapshots/<FILENAME> .
Once the database snapshot is downloaded, compare the file’s checksum value with the one shown at rpc.pathfinder.equilibrium.co/snapshots/latest by running:
sha256sum <FILENAME>
If the checksum values match, extract the downloaded database snapshot by running:
zstd -T0 -d EXACT_FILE_NAME -o testnet-sepolia.sqlite
Running the node
Now that the database snapshot is extracted, you can start your node by running:
docker run \
--name pathfinder \
--restart unless-stopped \
--detach \
-p 9545:9545 \
--user "$(id -u):$(id -g)" \
-e RUST_LOG=info \
-e PATHFINDER_ETHEREUM_API_URL=$ETHEREUM_URL \
-v $HOME/pathfinder:/usr/share/pathfinder/data \
eqlabs/pathfinder
Once the docker container is up and running, you can check the docker image’s logs by running:
docker logs -f pathfinder
If successful, the result should resemble the following:
...
2025-05-12T18:30:36 INFO Updated Starknet state with block 766534
2025-05-12T18:31:07 INFO Updated Starknet state with block 766535
2025-05-12T18:31:35 INFO Updated Starknet state with block 766536
...
To stop the node’s execution, run:
|
Running Pathfinder’s attestation service
Luckily, running Pathfinder’s attestation service is as simple as running:
docker run -it --rm --network host \
-e VALIDATOR_ATTESTATION_OPERATIONAL_PRIVATE_KEY=$OPERATIONAL_PRIVATE_KEY \
ghcr.io/eqlabs/starknet-validator-attestation \
--staking-contract-address 0x03745ab04a431fc02871a139be6b93d9260b0ff3e779ad9c8b377183b23109f1 \
--attestation-contract-address 0x03f32e152b9637c31bfcf73e434f78591067a01ba070505ff6ee195642c9acfb \
--staker-operational-address $OPERATIONAL_ADDRESS \
--node-url http://localhost:9545/rpc/v0_8 \
--local-signer
If successful, the result should look similar to the following:
Current attestation info staker_address=0x48f8ddc0bc864f33d4c47b79a1f0e1460e0777d0b0224d8c291f1039523306e operational_address=0x48f8ddc0bc864f33d4c47b79a1f0e1460e0777d0b0224d8c291f1039523306e stake=100000000000000000000 epoch_id=1201 epoch_start=712773 epoch_length=40 attestation_window=16
2025-04-22T11:04:22.716449Z INFO starknet_validator_attestation::state: New epoch started staker_address=0x48f8ddc0bc864f33d4c47b79a1f0e1460e0777d0b0224d8c291f1039523306e operational_address=0x48f8ddc0bc864f33d4c47b79a1f0e1460e0777d0b0224d8c291f1039523306e stake=100000000000000000000 epoch_id=1205 epoch_start=712933 epoch_length=40 attestation_window=16
2025-04-22T11:11:00.263344Z INFO starknet_validator_attestation::state: Attestation transaction sent transaction_hash=0x79f9f5ec8dbfca48a132e8d23caad15455c6e0dc98ec517a7013c374d7d5501
2025-04-22T11:11:03.017827Z INFO starknet_validator_attestation::state: Attestation confirmed staker_address=0x48f8ddc0bc864f33d4c47b79a1f0e1460e0777d0b0224d8c291f1039523306e epoch_id=1205