Install guide
Update packages
Copy sudo apt update && sudo apt upgrade -y
Install Pyton
Install Pip
to manage software packages for Python.
Copy sudo apt install -y python3-pip
Install a few more packages and development tools
Copy sudo apt install -y curl git screen build-essential libssl-dev libffi-dev python3-dev
sudo apt-get install libgmp-dev
pip3 install fastecdsa
sudo apt-get install -y pkg-config
Install Rust
Copy curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
Install Cargo
Copy sudo apt install cargo -y
source $HOME/.cargo/env
Update Rust to the latest version
Clone Pathfinder github repository
Copy ver=""
git clone --branch $ver https://github.com/eqlabs/pathfinder.git
Create a virtual environment for a node
Copy sudo apt install python3.8-venv
# Open separate terminal to run node
screen -S stark
# Move to py folder
cd pathfinder/py
# Create the virtual environment called venv
python3 -m venv .venv
# and activate it
source .venv/bin/activate
# Install some more tools for node
PIP_REQUIRE_VIRTUALENV=true pip install --upgrade pip
PIP_REQUIRE_VIRTUALENV=true pip install -r requirements-dev.txt
# Test if previous steps were successful
pytest
Assemble node
Copy cargo build --release --bin pathfinder
Create Infura or Alchemy account
Go to Alchemy (for ex.) and sing up.
On dashboard click on Create App
Give new app a name and choose either Mainnet or Goerli Network
You will now be able to see the endpoint on your dashboard. Copy the https one
Run node
Copy cargo run --release --bin pathfinder -- --ethereum.url https://mainnet.infura.io/v3/xxxxx
# or
cargo run --release --bin pathfinder -- --ethereum.url https://eth-goerli.alchemyapi.io/v2/xxxxx
To exit from screen
tap CTRL+a
and than d
.
Update node
Enter to screen
To stop node tap CTRL+c
, than CTRL+a
and d
Update bin
Copy cd pathfinder
rm -rf pathfinder
git fetch
ver=""
git checkout $ver
git clone --branch $ver https://github.com/eqlabs/pathfinder.git
Enter to screen
Run node
Copy cd $HOME/pathfinder/py
python3 -m venv .venv
source .venv/bin/activate
PIP_REQUIRE_VIRTUALENV=true pip install --upgrade pip
PIP_REQUIRE_VIRTUALENV=true pip install -r requirements-dev.txt
pytest
cargo build --release --bin pathfinder
# run node
cargo run --release --bin pathfinder -- --ethereum.url https://mainnet.infura.io/v3/xxxxx
# or
cargo run --release --bin pathfinder -- --ethereum.url https://eth-goerli.alchemyapi.io/v2/xxxxx
To exit from screen
tap CTRL+a
and than d
.