🐳Docker
Authors: [man4ela | catapulta.eth]
System Requirements
4-Core CPU
Debian 12/Ubuntu 22.04
=> 8 GB RAM
250 GB+
(SSD or NVMe)
Pathfinder is a Rust implementation of a Starknet full node that provides a secure view into the Starknet blockchain. As a full node, Pathfinder provides access to Starknet's entire state history, allowing users to query contract code, storage, and transactions.
Before you start, make sure that you have your own synced Ethereum mainnet L1 RPC URL ready with WS port enabled
Pre-Requisites
sudo apt update -y && sudo apt upgrade -y && sudo apt autoremove -y
sudo apt install -y wget curl screen git ufwSetting up Firewall
sudo ufw default deny incoming
sudo ufw default allow outgoing
sudo ufw allow 22/tcp
sudo ufw allow 80
sudo ufw allow 443Enable Firewall
Install Docker
Run this command to remove any conflicting docker
Add Docker's official GPG key:
Add the repository to ppt sources:
Install docker
Setting up a domain name to access RPC
Get the IP address of the host machine, you can use the following command in a terminal or command prompt
Set an A record for a domain, you need to access the domain's DNS settings and create an A record that points to the IP address of the host machine. This configuration allows users to reach your domain by resolving the domain name to the specific IP address associated with your host machine.
Create Starknet directory
Create .env file
Paste the following into the file.
Ctrl + x and y to save file
Pathfinder only recognizes an endpoint through WebSocket protocol, so make sure to specify it using the wss:// scheme (e.g., wss://your-endpoint)
Launch Starknet full node
Paste the following into the docker-compose.yml:
Monitor Logs
Use docker logs to monitor your starknet node. The -f flag ensures you are following the log output
Once your Pathfinder Starknet node starts syncing, the logs are expected to look like this:
1. Check the Chain ID
This confirms which Starknet network the node is connected to:
Expected Response:
Mainnet
0x534e5f4d41494e
SN_MAIN
2. Check the Latest Block Number
This ensures that your node is syncing correctly and producing up-to-date data.
Expected Response:
The value returned in resultfield indicates a current block number and should increase over time, confirming that your node is syncing properly.
Pathfinder Starkent node takes approximately 7 days to fully catch up to the latest chain head when syncing from Genesis
References
Last updated
Was this helpful?