-
Notifications
You must be signed in to change notification settings - Fork 195
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
disco: refactor tiles into standard layout
The tile code had been getting copy pasted and duplicated in interesting ways that were starting to show their age. This commit refactors all of the tiles onto a standard infrastructure, the mux tile. The mux tile is used because it is the most general. * All tiles are rewritten to be a small wrapper around the mux tile. The mux tile gains some functionality, namely the ability to make callbacks to the user, to enable the tiles to change its behavior. This eliminates a large amount of boilerplate and makes it obvious in what ways each tile deviate from the standard. Mux also gains the ability to filter fragments. * As part of this refactor, many of the deviations from the standard were removed because they were either no longer needed or were not correct. Some of these include, - Each flow control imlementation was subtly different, and these differences were dropped. All flow control is now standard mux logic. Same goes for deciding which (if any) producer to poll. - Redundant metrics written to the cnc diagnostic region by the QUIC tile are removed. - Some tiles republished ctl, tspub, and other fields, and some did not. All tiles now republish as appropriate. - The pack tile distributed to N consumers with N mcaches, rather than 1 like the mux tile. It also repurposed flow control credits to be used as a "pack" credit, which wasn't being initialized correctly but also was unclear. - Various others. * The boundary between fdctl and frank has been removed, and the boundary betwen (what was) frank and disco has been clarified. The tiles in disco are an API, with fdctl as one of the callers. The API boundary is that disco will not allocate any memory, and expects all objects needed to communicate with the rest of the system to be provided to it with no further configuration needed. Objects that are shared between multiple processes or need to be observed by a supervisor are created by, and then mapped into the tile processes. Objects only needed by an individual tile (for example, the tcache in dedup), are created in scratch space on the stack if possible, or if they are too large, in the tile's workspace. There are no other allocations. * The bounds checking on tile fragment readers has been improved (or implemented at all in some cases). * The QUIC tile has been refactored more deeply. The raw UDP transaction handling is moved out to disco, and the context object for that logic is merged with the QUIC context object for simplicity. * The shared TPU workspace between tiles has been removed as a security issue, tiles are back to copying data between each stage of the TPU pipeline. * The TPU MTU was removed from the config file since it's always static. * The forwarding tile skeleton has been removed, since we have decided not to implement this functionality. * Moved the frank tile pieces into fdctl and removed all references to "frank" in the codebase. Frankendancer remains only in the README, to describe the current side-by-side model on main. * Removed disco from FFI, there's not really any reason anyone would need to call Firedancer tiles from Rust, and it just slowed down the build. * The dev1 command had broken at some point due to sandbox changes, and has been restored. * The `fd_tempo_tick_per_ns` calibration is moved to the `init` step of each tile, if they need to access fd_tempo_tick_per_ns, rather than being passed in via. fdctl.
- Loading branch information
1 parent
743618d
commit a2106f7
Showing
57 changed files
with
2,326 additions
and
3,363 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file was deleted.
Oops, something went wrong.
Submodule solana
updated
11 files
+176 −194 | Cargo.lock | |
+73 −73 | Cargo.toml | |
+25 −72 | core/src/banking_stage.rs | |
+15 −13 | core/src/shred_fetch_stage.rs | |
+12 −0 | firedancer/src/mcache.rs | |
+114 −114 | programs/sbf/Cargo.lock | |
+24 −24 | programs/sbf/Cargo.toml | |
+49 −1 | runtime/src/bank.rs | |
+1 −0 | runtime/src/bank/tests.rs | |
+2 −2 | sdk/cargo-build-sbf/tests/crates/fail/Cargo.toml | |
+2 −2 | sdk/cargo-build-sbf/tests/crates/noop/Cargo.toml |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.