Code Monkey home page Code Monkey logo

firedancer's Introduction

Firedancer ๐Ÿ”ฅ๐Ÿ’ƒ

Firedancer is a new validator client for Solana.

  • Fast Designed from the ground up to be fast. The concurrency model is borrowed from the low latency trading space, and the code contains many novel high performance reimplementations of core Solana primitives.
  • Secure The architecture of the validator allows it to run almost completely in user space with a highly restrictive sandbox.
  • Independent Firedancer is written from scratch. This brings client diversity to the Solana network and helps it stay resilient to supply chain attacks in build tooling or dependencies.

Installation

Firedancer is currently under heavy development and is not ready for production use. There are no releases available.

Developing

The getting started guide has detailed system setup instructions.

$ git clone --recurse-submodules https://github.com/firedancer-io/firedancer.git
$ cd firedancer
$ ./deps.sh
$ make -j run

The make run target runs the fddev dev command. This development command will ensure your system is configured correctly before starting a Solana validator on the local machine. fddev will use sudo to make privileged changes to system configuration where needed.

By default fddev will create a new chain with a genesis block, along with any keys needed to start the initial validator. If you wish to join this cluster with other validators, you can define [rpc.entrypoints] in the configuration file to point at your first validator and run fddev dev again.

Running

In production, it is recommended to configure the system immediately at boot time rather than when running Firedancer. This ensures a contiguous block of memory can be reserved, as it may not be possible when the machine has been running a long time.

$ fdctl configure init all

fdctl reads from an optional FIREDANCER_CONFIG_TOML environment variable to determine all configuration. A complete list of configuration options and their defaults are provided in default.toml

Later, when you wish to start the validator, you can run

$ fdctl run

Unlike fddev, fdctl will not try to gain root to perform configuration, and will not automatically create required keys or a genesis block. The [rpc.entrypoints] and [consensus.identity_path] configuration options must be defined in order to start the production validator.

Some of the privileged system configuration steps performed by fdctl configure are,

  • Huge pages Memory needed for Firedancer must be pre-allocated before launching it. Firedancer uses huge and gigantic memory pages, which are mounted in a local directory. Enabling huge pages and mounting them to a pseudo filesystem requires root privileges.
  • XDP Kernel bypass is used for networking, via the eXpress Data Path. Installing the packet filtering code into the driver requires a privileged process, and must be done before running Firedancer. You may also need to configure the network driver to support multiple channels, which requires root.
  • Sandboxing Firedancer installs a BPF program to restrict itself from making certain system calls, and in certain development environemnts fdctl installs network namespaces to simplify network debugging when using XDP. Performing these initial restrictions can require additional capabilities.

A good way to see what privileges are needed to configure the environment is to run fdctl configure init all as a non-privileged user, which will display information about the operations it wishes to perform.

License

Firedancer is available under the Apache 2 license. Firedancer also includes external libraries that are available under a variety of licenses. See LICENSE for the full license text.

firedancer's People

Contributors

kbowers-jump avatar riptl avatar nbridge-jump avatar lidatong avatar mmcgee-jump avatar ptaffet-jump avatar marcus-ares avatar cantelopepeel avatar asiegel-jt avatar smcio avatar leoluk avatar kaasaraai-jump avatar dependabot[bot] avatar ripatel-fd avatar tpointon-jump avatar jvarela-jump avatar llamb-jump avatar jumpsiegel avatar albererre avatar gtrepta avatar metaproph3t avatar anoushk1234 avatar gnewsome-jump avatar lheeger-jump avatar wayne-jump 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.