Local deployment without Docker
Firehose Starknet local deployment without Docker
Tip: Deploying with Docker is recommended for easier setup and maintenance.
Overview
This guide walks you through installing firehose-starknet and the instrumented pathfinder node from source, and demonstrates running the Firehose stack without using Docker.
Prerequisites
You need these to get started:
Installation
Instrumented pathfinder
pathfinderTo install the instrumented pathfinder (v0.10.2) from source, simply run this cargo command:
PATHFINDER_FORCE_VERSION="v0.10.2" cargo install --locked --git https://github.com/starknet-graph/pathfinder --tag v0.10.2 pathfinderTip: You can uninstall later it with:
cargo uninstall pathfinderVerify that the pathfinder command is now available:
pathfinder --versionTip: If the command is not found, make sure the directory $HOME/.cargo/bin is in your PATH environment variable.
firehose-starknet
firehose-starknetTo install firehose-starknet (v0.2.1) from source, first clone the repository anywhere you like:
git clone https://github.com/starknet-graph/firehose-starknetThen change directory into the repository:
cd firehose-starknetMake sure you're checked out to the desired version (v0.2.1):
git checkout v0.2.1And run the installation command:
go install ./cmd/firestarkThe firehose-starknet application is available as the firestark command. Verify that it's been installed successfully:
firestark --versionTip: If the command is not found, make sure the directory $HOME/go/bin (or $GOPATH/bin) is in your PATH environment variable.
Running the Firehose stack
First of all, a new data directory should be created for persisting Firehose and node data. This can be any folder you want, here we create a firestark-data folder in the current working directory:
mkdir ./firestark-dataThen, make 4 sub-directories inside it to store data from different components:
mkdir ./firestark-data/node ./firestark-data/one-blocks ./firestark-data/merged-blocks ./firestark-data/forked-blocksNow run the following firestark command, where YOUR_ETHEREUM_URL must be replaced with your own URL for Ethereum Mainnet RPC, to bring up the whole stack:
firestark \
--config-file "" \
start firehose reader-node merger relayer \
--reader-node-path pathfinder \
--reader-node-arguments "--data-directory $(pwd)/firestark-data/node --ethereum.url YOUR_ETHEREUM_URL" \
--common-one-block-store-url "file:///$(pwd)/firestark-data/one-blocks" \
--common-merged-blocks-store-url "file:///$(pwd)/firestark-data/merged-blocks" \
--common-forked-blocks-store-url "file:///$(pwd)/firestark-data/forked-blocks"Once the process is up and running, the Firehose stack will start producing blocks. You can verify that it's working by running this grpcurl command:
grpcurl -plaintext -d '{"start_block_num": 0}' localhost:10015 sf.firehose.v2.Stream.BlocksTip: You need to have grpcurl installed for this command to work.
The grpcurl command subscribes to the block stream, and you should be able to see new blocks being printed to the console as they become available.
Last updated
Was this helpful?
