firedancer: return correct CUs for stop_use_static_simple_vote_tx_cost#15
Open
topointon-jump wants to merge 30 commits intov4.0.0-beta.2-fdfrom
Open
firedancer: return correct CUs for stop_use_static_simple_vote_tx_cost#15topointon-jump wants to merge 30 commits intov4.0.0-beta.2-fdfrom
topointon-jump wants to merge 30 commits intov4.0.0-beta.2-fdfrom
Conversation
(cherry picked from commit a06c4db)
The libbz2-sys crate will attempt to discover a system libbz2 via pkg-config. If found, libbz2 will not be compiled as part of the cargo build process. However, Firedancer's build system will never link bz2 regardless of what cargo build does. This will cause link errors regarding missing libbz2 symbols depending on the system's pkg-config. Cargo's bizarre feature system does not allow the user to directly control the way libbz2 is linked. Instead, every crate dependent on libbz2 will have to plumb down the static feature down to libbz2. (e.g. rocksdb => librocksdb-sys => bzip2-sys) In another bizarre twist, the rocksdb crate even with default features disabled, will add libz and libbz2 crates, without the static features. Thus, we add back the bzip2 feature to RocksDB, which somehow fixes this behavior.
We want to link the validator and genesis binaries into our Firedancer binary for zero configuration and easy deployment. We also don't want to rename the main.rs files, since that would cause repeated merge conflicts and make it hard to tell what Firedancer has changed. To do this, we point lib.rs at main.rs (main is a module), and then don't try build the binary.
Firedancer determines the port for the TVU, which is specified in its config file, so an argument is added to the CLI and plumbed all the way through to gossip to wire this up.
The Firedancer shredder needs to know which nodes in the cluster to forward shreds to, which information is currently maintained by the Solana Labs cluster info. For now, we communicate this across the IPC boundary.
It's important for the Firedancer pack code to see all available transactions for packing, so it can schedule them optimally and avoid conflicts. Previously we have rerouted all transactions except gossiped votes which came via. a different path. This change also reroutes those so everything goes to Firedancer. We route gossiped votes to the dedup tile so that if the same vote comes in over the normal TPU port, it's correctly identified as a duplicate. Co-authored-by: Yufeng Zhou <yufzhou@jumptrading.com>
The leader schedule cache is updated so that it has an optional path to send stake weights to firedancer. This is done on a mcache because we do not want to drop or miss any recomputations, otherwise Firedancer will not recover. The pack tile uses stake weights to compute the leader schedule, and the shred tile uses stake weights to compute shred destinations.
The shred version sometimes needs to be fetched via. gossip on startup, which Firedancer can't do so we communicate it to Firedancer here via shared memory.
Co-authored-by: Yufeng Zhou <yufzhou@jumptrading.com>
Co-authored-by: Yufeng Zhou <yufzhou@jumptrading.com>
a87af37 to
6ea8eac
Compare
470a265 to
4fb7b58
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.