How does the Solana validator client Firedancer perform? How does it work?

Written by Karen, Foresight News

Last week’s Solana Breakpoint conference was full of excitement, with ecosystem product releases and a variety of colorful peripheral activities. The highlight of this event was the official launch of an early version of the Solana validator client, Firedancer, on the mainnet. This milestone achievement has been given special attention, marking a qualitative leap in performance for the Solana network while avoiding the risk of network downtime caused by a single client crash on Solana.

The development process of Firedancer can be traced back to 2021 to 2022. As the second validator client of Solana developed by Jump Trading Group (the original client Agave was developed by Anza), its original design is to eliminate the hidden danger of single point of failure. Enhance the overall robustness and resilience of the network. Unlike the original Rust-based validator, Firedancer is written in C language and does not contain Rust code. This choice significantly reduces the impact of potential vulnerabilities on the entire network and adds another solid line of defense to Solana's security.

How does Firedancer perform?

According to a demonstration by Kevin Bowers, chief scientific officer of Jump Crypto, at the Solana Breakpoint conference, Firedancer demonstrated the ability to process more than 1 million transactions per second, a figure far exceeding Solana’s current theoretical limit of tens of thousands of TPS. Kevin Bowers also figuratively likened this achievement to widening a “country road” into an “interstate highway,” heralding the dual optimization of network costs and capacity.

Liam Heeger, core engineer of Jump Trading, shared the progress of Firedancer on the test network. The client has successfully produced more than 20,000 blocks and achieved a staking ratio of 1%.

Another engineer, Aryaman Jain, gave a demonstration that further revealed Firedancer’s performance under certain conditions. For example, in an environment with 10 validators, its TPS could reach millions, with more than 1.2 billion computing units processed per second, while demonstrating a Blockspace capacity of 3.5 Gbps and a VM execution efficiency of 500,000 TPS.

How does Firedancer work?

Firedancer is built around three main components: a high-performance computing stack and a network stack, a runtime, and a consensus mechanism. The key to Firedancer’s ability to boost the performance of the Solana network to 1 million TPS (current protocol-level limitations limit performance to around 81,000 TPS) lies in its innovative architecture design and data flow optimization.

The validator adopts a concurrency model to perform diverse tasks through a small number of threads, with each thread focusing on specific tasks, such as network packet processing, transaction verification, block packaging, etc. This design achieves maximum utilization of resources and significantly increases transaction processing speed.

Specifically, each thread performs one of 11 different jobs. Some jobs require only one thread to complete them, but some jobs require many threads to perform the same work in parallel. In addition, each thread has a CPU core to run on, and the thread has ownership of that core: it will never sleep or let the operating system use it for other purposes.

Firedancer also introduces an architecture called "tiles", each tile represents a job and its running threads and assigned CPU cores. This combination makes performance tuning flexible and efficient. For example, each tile of net and quic can process >1 million TPS, while verify and bank tiles focus on transaction verification and block execution. Although their processing speed is relatively low, it is enough to meet the needs of high concurrency scenarios.

The Firedancer official documentation lists 11 tiles, namely:

  1. net: sends and receives network packets from network devices (can handle >1 million TPS per tile);

  2. quic: receives transactions from clients, performs all connection management and packet processing to manage and implement the QUIC protocol (can handle >1 million TPS per tile);

  3. Verify: Verify the cryptographic signature of incoming transactions and filter out invalid transactions (each tile can handle 200,000-40,000 TPS);

  4. dedup: Checks and filters out duplicate incoming transactions;

  5. pack: When becoming a leader, pack incoming transactions and intelligently schedule them for execution;

  6. Bank: executes scheduled transactions (each tile can handle 200,000-40,000 TPS);

  7. Poh: is a mechanism that continuously performs hashing in the background, mixing the generated hash values ​​with the executed transactions to prove sequentiality and timeliness.

  8. shred: distributes block data to the network when it becomes the leader; receives and retransmits block data when it is not the leader (throughput depends mainly on the cluster size. In benchmarks, if the cluster size is small, 1 tile can handle >1 million TPS);

  9. store: receives block data when becoming a leader, or receives block data from other nodes when other nodes are leaders, and stores it in a database on the local disk;

  10. metric: collects monitoring information about other tiles and provides it to an HTTP endpoint;

  11. sign: Holds the validator private key, and receives and responds to signature requests from other tiles.

It is worth noting that before Firedancer matured, its transitional version Frankendancer had already entered the Solana mainnet. Frankendancer is a hybrid of Firedancer and some Agave codes, combining Firedancer's advantages in network stack and block production while retaining Agave's functions in execution and consensus. Firedancer was built completely from scratch and does not contain any Agave code.

What is the impact of Firedancer?

Undoubtedly, the launch of Firedancer will have a significant impact on the Solana ecosystem. It will greatly enrich the diversity of validators, further weaken the impact of single points of failure on network stability, and build a more solid fortress for the reliability of the Solana network.

In addition, Firedancer maintains backward compatibility with existing protocols, ensuring a smooth transition of the ecosystem without requiring DApp developers and users to make major adjustments.

Although Firedancer is still in non-voting mode and is subject to ongoing optimization and review, this paints a more promising picture for the future development of the Solana network.

Reference:

1、https://www.youtube.com/watch?v=InGI7BDUeX4&list=PLilwLeBwGuK4eY3nT0vvvJ4GmcJLImcQE&index=14

2、https://firedancer-io.github.io/firedancer/guide/tuning.html

3、https://solanacompass.com/learn/Validated/firedancer-w-kevin-bowers