Git Product home page Git Product logo

teleport's Introduction

Teleport

A fast implementation of a Farcaster Hub, in Rust.

⚠️⚠️ The project is still under active development and nowhere close to being production ready ⚠️⚠️

Introduction

If you are new to Farcaster Hubs and/or Teleport - here's a quick video that does a high-level overview of the responsibilities of a Hub and where Teleport is at.

Note that the codebase will outpace the video, and things mentioned TODO in the video might have been done now.

<iframe width="560" height="315" src="https://www.youtube.com/embed/YXu2DGMhIao" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>

Rough Features

There are a few things Teleport is currently capable of, and a lot more it is not currently capable of. In no specific order, Teleport can currently:

  • Start a libp2p gossip node and connect to other peers
  • Broadcast Gossip Messages to enable features like posting casts
  • Sync on-chain events from contracts deployed to Optimism
  • [-] Do PubSub peer discovery over GossipSub (partial support)

A lot is still left to do:

  • Diff sync with other hubs
  • gRPC APIs
  • REST API
  • CLI
  • Metrics
  • Easier APIs for different "types" of FC Messages

Prerequisites

  • Rust
  • Protobufs Compiler (brew install protobuf or apt install -y protobuf-compiler)
  • SQLx CLI (cargo install sqlx-cli)

Prost Patch

Up until recently, there was a Protobuf incompatibility issue with using prost in this codebase compared to ts-proto that is used in Hubble. As such, we have a patched version of prost that is used (Found Here).

In a recent update the Protobuf schema was updated to add a new field that allows us to get by that issue by serializing the message differently. That hasn't been implemented yet in Teleport but technically we don't need to maintain a patched version of prost anymore.

Database

  1. create the database
make db-create
  1. run the migrations
make db-migrate

Start the Hub

FARCASTER_PRIV_KEY=<YOUR_PRIVATE_KEY> OPTIMISM_L2_RPC_URL=<RPC_URL_FOR_OP> cargo run

teleport's People

Contributors

avichalp avatar gregfromstl avatar haardikk21 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.