Farcaster hubble setup
This section describes the steps for adding a farcaster hubble to the netrabrick.
Download and install the hubble docker repository hub-monorepo locally:
mkdir farcaster
cd fastercer
git clone https://github.com/farcasterxyz/hub-monorepo.git
cd hub-monorepo/apps/hubble/
Add docker-compose functionality, if necessary:
sudo apt-get install docker-compose-plugin
Generate your identity key pair with docker compose.
sudo chmod 777 .hub .rocks
docker compose run hubble yarn identity create
Create a .env file in
apps/hubble
with your Ethereum RPC endpoints:
# Set this to your L1 Mainnet ETH RPC URL
ETH_MAINNET_RPC_URL=http://geth.dappnode:8545
# Set this to your L2 Optimism Mainnet RPC URL
OPTIMISM_L2_RPC_URL=https://eth-sepolia.g.alchemy.com/v2/demo
# Set this to your Farcaster FID
HUB_OPERATOR_FID="Your Farcaster FID"
# For farcaster mainnet:
FC_NETWORK_ID=1
BOOTSTRAP_NODE=/dns/nemes.farcaster.xyz/tcp/2282
# For farcaster testnet:
FC_NETWORK_ID=2
BOOTSTRAP_NODE=/dns/testnet1.farcaster.xyz/tcp/2282
STATSD_METRICS_SERVER=statsd:8125
Start Hubble with docker compose in detached mode:
docker compose up hubble -d
Docker compose will start a Hubble container that exposes ports for networking and writes data to .hub
and .rocks
directories. Hubble will now sync with the contracts and other hubble instances to download all messages on the network.
To view the status of the sync and hubble, follow the logs
docker compose logs -f hubble
Follow the instructions in the monitoring instructions to set up Grafana and view your Hub's status in real-time.
To view the status of the sync and hubble, follow the logs
mtb@netrabrick:~/farcaster/hub-monorepo/apps/hubble$ docker compose logs -f hubble
hubble-1 | 2024-04-24T21:10:17: PM2 log: Launching in no daemon mode
hubble-1 | 2024-04-24T21:10:17: PM2 log: App [hubble:0] starting in -cluster mode-
hubble-1 | 2024-04-24T21:10:18: PM2 log: App [hubble:0] online
hubble-1 | {"message":"\n Hubble Startup Checks\n","timestamp":"2024-04-24T21:10:19.423Z","type":"out","process_id":0,"app_name":"hubble"}
hubble-1 | {"message":"------------------------\n","timestamp":"2024-04-24T21:10:19.424Z","type":"out","process_id":0,"app_name":"hubble"}
hubble-1 | {"message":"✅ | Farcaster: 2024.3.20 Hubble: 1.11.8\n","timestamp":"2024-04-24T21:10:19.424Z","type":"out","process_id":0,"app_name":"hubble"}
hubble-1 | {"message":"✅ | Detected 62GB of RAM\n","timestamp":"2024-04-24T21:10:19.424Z","type":"out","process_id":0,"app_name":"hubble"}
hubble-1 | {"message":"✅ | Directory /home/node/app/apps/hubble/.rocks is writable\n","timestamp":"2024-04-24T21:10:19.424Z","type":"out","process_id":0,"app_name":"hubble"}
hubble-1 | {"message":"✅ | Directory /home/node/app/apps/hubble/.hub is writable\n","timestamp":"2024-04-24T21:10:19.424Z","type":"out","process_id":0,"app_name":"hubble"}
hubble-1 | {"message":"✅ | Found PeerId 12D3KooWJr4NYAm9429vBqpfvTZMn2Ay68esZ2TZVC8KyMwZFwUC\n","timestamp":"2024-04-24T21:10:19.453Z","type":"out","process_id":0,"app_name":"hubble"}
hubble-1 | thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: MetricError { repr: IoError(Custom { kind: Uncategorized, error: "failed to lookup address information: Name or service not known" }) }', src/statsd.rs:61:14
hubble-1 | note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
hubble-1 | You have triggered an unhandledRejection, you may have forgotten to catch a Promise rejection:
hubble-1 | Error: internal error in Neon module: called `Result::unwrap()` on an `Err` value: MetricError { repr: IoError(Custom { kind: Uncategorized, error: "failed to lookup address information: Name or service not known" }) }
hubble-1 | at rsCreateStatsdClient (file:///home/node/app/apps/hubble/src/rustfunctions.ts:90:7)
hubble-1 | at initializeStatsd (file:///home/node/app/apps/hubble/src/utils/statsd.ts:47:3)
hubble-1 | at Command.<anonymous> (file:///home/node/app/apps/hubble/src/cli.ts:388:9)
hubble-1 | You have triggered an unhandledRejection, you may have forgotten to catch a Promise rejection:
hubble-1 | Error: internal error in Neon module: called `Result::unwrap()` on an `Err` value: MetricError { repr: IoError(Custom { kind: Uncategorized, error: "failed to lookup address information: Name or service not known" }) }
hubble-1 | at rsCreateStatsdClient (file:///home/node/app/apps/hubble/src/rustfunctions.ts:90:7)
hubble-1 | at initializeStatsd (file:///home/node/app/apps/hubble/src/utils/statsd.ts:47:3)
hubble-1 | at Command.<anonymous> (file:///home/node/app/apps/hubble/src/cli.ts:388:9)
Follow the instructions in the monitoring instructions to set up Grafana and view your Hub's status in real-time.