Farcaster- Hubble node

Run a hubble client for Farcaster protocol

Farcaster is a decentralized social network, as an open protocol that can support many clients, just like email.

Users will always have the freedom to move their social identity between applications, and developers will always have the freedom to build applications with new features on the network.

What is a Hub: A Hub is a node in the Farcaster network that synchronizes the delta graph. It's similar to a blockchain node but with a different consensus mechanism. Hubs get deltas from clients broadcast them to other hubs over a peer-to-peer protocol. They listen to updates from the Ethereum blockchain and update the identity state of the delta graph as needed.

Hubble is a Typescript implementation of a Farcaster Hub.

Hardware Requirements

2 vCPUs, 8GB RAM, 15GB SSD storage (1TB+ for local eth node). OS: Ubuntu 20.04 (focal)

1. Setup - Install dependencies

Update System

sudo apt update && sudo apt upgrade -y

Install Git

sudo apt install curl git -y

Install Node

Install NVM (node version manager)

NVM or Node version manager, is an open-source manager for node.js and makes it easy to switch between versions of node and NPM. node version 18+ is required for hubble.

Install Node version manager

curl https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash 
source ~/.bashrc

Use NVM to install Node.js

nvm install node

Install a specific version of node and use that version

nvm install 18.7.0
nvm use 18.7.0

Install Yarn

Import the repository’s GPG key and add the Yarn APT repository to your system

curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list

update the package list, and install Yarn.

sudo apt update
sudo apt install --no-install-recommends yarn

the flag --no-install-recommends skips node.js install

Confirm Installation with yarn --version

Install Flatbuffers

Flatbuffers is a cross platform serialization library for a variety of programming languages

Install via Apt (compatible with 20.04 focal)

sudo apt update
sudo apt install -y flatbuffers-compiler

Alternative methods can be found here.

2. Get an Ethereum Endpoint

Farcaster is currently on Goerli Ethereum testnet before migrating to Ethereum mainnet.

The hub requires a connection to an Ethereum endpoint, this is a node running software that can verify blocks and transaction data on the Ethereum blockchain.

Method 1: Use a third party service

You can use a trusted service such as the following, these are hosted services

Infura / Alchemy

Method 2: Run your own Node

Configure Manually: Step by Step instructions here on how to set up and Ethereum node with nethermind and nimbus clients

The RPC port will need to be exposed, you might need to port forward on your router and open 8545 on ufw firewall settings, sudo ufw allow 8545

To connect to the node locally http://<local-ip-address>:8545

To connect to the node running on the same device as hubble, https://localhost:8545

Easy Setup: some options for easy one click Ethereum node deployments

3. Run Hubble

Clone Hubble repository

git clone https://github.com/farcasterxyz/hubble.git

Build Hubble

cd hubble && yarn install && yarn build
Successful build should look like this
Successful build should look like this

Create a network identity for your Hub

Move to Directory

cd app/hubble 
yarn identity create

Start the Hub

to boot up the Hub, where eth-rpc-url points to the Goerli node's RPC

yarn start -e <eth-rpc-url>
Subscribe to GLCstaked
Receive the latest updates directly to your inbox.
Mint this entry as an NFT to add it to your collection.
Verification
This entry has been permanently stored onchain and signed by its creator.