Repository navigation
disco, flamenco: SIMD-0675 geo-aware leader schedule - #12402
Open
topointon-jump wants to merge 1 commit into
Conversation
topointon-jump
added this pull request to stack #12320
October 19, 2026 02:54
┌─ ⚡ PERF · 4aa0987 vs main@b588abe ─────────────────────────────────
│ SUITE BASELINE NEW Δ
│ replay tps, mainnet 29,881 tps 30,124 tps · +0.81%
│ bench tps, localnet 666,620 tps 665,637 tps · -0.15%
│ snapshot load, testnet 3.71 s 3.71 s · -0.05%
!│ mem total, mainnet 150.13 GiB 150.13 GiB ▲ 0.00%
!│ mem total, testnet 87.25 GiB 87.25 GiB ▲ 0.00%
!│ mem total, ag mainnet 150.94 GiB 150.94 GiB ▲ 0.00%
│ clean compile, firedancer 3.45 s 3.47 s · +0.68%
│ binary size, firedancer 60.14 MB 60.17 MB · +0.06%
├─────────────────────────────────────────────────────────────────────
@@ 0 REGRESSIONS · 3 WARNINGS · 0 IMPROVED · 5 NOISE @@
└─────────────────────────────────────────────────────────────────────history · 11 pushes ┌─ HISTORY · Δ vs main, per push, newest first ──────────────────────────────────
│ HEAD TPS BENCH SNAP MEM·M MEM·T AG·M COMPILE BINARY
!│ 4aa0987 +0.81% -0.15% -0.05% 0.00% 0.00% 0.00% +0.68% +0.06%
!│ fc2336c +0.62% -0.27% -0.11% 0.00% 0.00% 0.00% +0.47% +0.06%
!│ f34c7d1 -0.06% +0.04% -0.49% 0.00% 0.00% 0.00% +0.54% +0.06%
!│ 8b88785 +0.07% +0.21% +0.71% 0.00% 0.00% 0.00% -0.83% +0.06%
!│ c9bcf6e -0.39% +0.67% +0.21% 0.00% 0.00% 0.00% +0.49% +0.06%
!│ 2f39c8a -0.98% -0.43% -0.21% 0.00% 0.00% 0.00% +0.44% +0.06%
!│ 9f37878 +0.59% +0.42% +0.38% 0.00% 0.00% 0.00% +1.07% +0.06%
!│ 48480c1 +1.23% … -0.49% 0.00% 0.00% 0.00% +1.15% +0.06%
│ 250af9f … … … … … … … …
!│ ceb4f08 -0.09% -0.26% -0.49% 0.00% 0.00% 0.00% -0.65% +0.06%
!│ 544068e +0.47% -0.15% -0.01% 0.00% 0.00% 0.00% +0.84% +0.06%
└──────────────────────────────────────────────────────────────────────────────── |
topointon-jump
force-pushed
the
firedancer-geo-aware-leader-schedule-simd-0675
branch
from
October 19, 2026 03:21
2c2331d to
489405c
Compare
Contributor
There was a problem hiding this comment.
🔵 Needs a closer look
The WIP consensus-critical scheduling and snapshot changes need protocol-conformance validation and human review after the identified issues are addressed.
2 open issues
What changed in this PR
Adds feature-gated geo-aware leader scheduling to Firedancer, carrying validator locations through stake caches, snapshots, and schedule consumers.
Changes:
- Reorders leader rotations using geographic clusters.
- Preserves validator locations across runtime and snapshot paths.
- Adds scheduling tests, fuzzing, and simulation coverage.
| File | Description |
|---|---|
| src/flamenco/stakes/test_vote_stakes.c | Tests location persistence and spill recovery. |
| src/flamenco/stakes/fd_vote_stakes.h | Adds locations to stake APIs. |
| src/flamenco/stakes/fd_vote_stakes.c | Preserves locations across stake caches. |
| src/flamenco/stakes/fd_stakes.c | Captures and exports validator locations. |
| src/flamenco/stakes/fd_stake_weight.h | Adds locations to vote weights. |
| src/flamenco/runtime/tests/test_inflation_rewards.c | Updates stake fixtures. |
| src/flamenco/runtime/tests/test_fee_reward.c | Keeps legacy scheduling in fixtures. |
| src/flamenco/runtime/tests/fd_svm_mini.c | Updates mock validator setup. |
| src/flamenco/runtime/tests/fd_block_harness.c | Supplies default locations. |
| src/flamenco/runtime/test_vat_refresh_vote_accounts.c | Tests location capture and activation. |
| src/flamenco/runtime/program/vote/test_vote_codec.c | Tests location accessor behavior. |
| src/flamenco/runtime/program/vote/test_validator_location.c | Tests squared distances. |
| src/flamenco/runtime/program/vote/fd_vote_codec.h | Declares location accessor. |
| src/flamenco/runtime/program/vote/fd_vote_codec.c | Extracts V5 locations. |
| src/flamenco/runtime/program/vote/fd_validator_location.h | Adds distance calculation. |
| src/flamenco/runtime/fd_runtime.c | Gates runtime scheduling by feature. |
| src/flamenco/leaders/test_leaders.c | Updates legacy scheduling calls. |
| src/flamenco/leaders/test_leaders_geo.c | Adds geographic scheduling tests. |
| src/flamenco/leaders/test_leaders_geo_sim.c | Simulates geographic scheduling effects. |
| src/flamenco/leaders/Local.mk | Registers tests and fuzz target. |
| src/flamenco/leaders/fuzz_leaders_geo.c | Checks reorder permutation invariants. |
| src/flamenco/leaders/fd_multi_epoch_leaders.h | Stores geographic scheduling mode. |
| src/flamenco/leaders/fd_multi_epoch_leaders.c | Propagates epoch feature gating. |
| src/flamenco/leaders/fd_leaders.h | Extends scheduling API. |
| src/flamenco/leaders/fd_leaders.c | Implements clustering and reordering. |
| src/flamenco/features/feature_map.json | Registers scheduling feature. |
| src/flamenco/features/fd_features_generated.h | Updates generated feature layout. |
| src/flamenco/features/fd_features_generated.c | Updates generated feature lookup. |
| src/discoh/guih/fd_guih.c | Adapts call with geographic mode disabled. |
| src/discof/votor/test_votor_tile.c | Disables feature in fixture. |
| src/discof/tower/test_tower_tile.c | Updates scheduling fixtures. |
| src/discof/rpc/test_rpc_tile.c | Disables feature in fixture. |
| src/discof/rpc/fuzz_rpc.c | Disables feature in fuzz setup. |
| src/discof/restore/utils/test_ssload.c | Tests restored locations. |
| src/discof/restore/utils/fd_ssmsg.h | Adds snapshot location field. |
| src/discof/restore/utils/fd_ssmanifest_parser.c | Parses and initializes locations. |
| src/discof/restore/utils/fd_ssload.c | Restores locations into stake caches. |
| src/discof/replay/test_replay_tile.c | Updates stake fixtures. |
| src/discof/execrp/test_execrp_tile.c | Updates stake fixture. |
| src/discof/backup/test_snap_roundtrip.c | Tests location round trips. |
| src/discof/backup/fd_ssmanifest_encoder.c | Encodes located entries as V5. |
| src/disco/shred/test_stake_ci.c | Tests schedule consistency across consumers. |
| src/disco/shred/test_shred_dest.c | Updates legacy scheduling calls. |
| src/disco/shred/fd_stake_ci.h | Stores geographic scheduling mode. |
| src/disco/shred/fd_stake_ci.c | Applies feature-gated scheduling. |
| src/disco/gui/fd_gui.c | Applies geographic scheduling to GUI. |
Review effort: Balanced
topointon-jump
force-pushed
the
firedancer-geo-aware-leader-schedule-simd-0675
branch
from
October 19, 2026 15:50
489405c to
8727b1c
Compare
topointon-jump
force-pushed
the
firedancer-geo-aware-leader-schedule-simd-0675
branch
from
October 19, 2026 19:15
8727b1c to
b63771c
Compare
topointon-jump
force-pushed
the
firedancer-geo-aware-leader-schedule-simd-0675
branch
from
October 19, 2026 19:24
b63771c to
253dd00
Compare
topointon-jump
force-pushed
the
firedancer-geo-aware-leader-schedule-simd-0675
branch
from
October 19, 2026 20:49
253dd00 to
7bc86c3
Compare
topointon-jump
force-pushed
the
firedancer-geo-aware-leader-schedule-simd-0675
branch
from
October 19, 2026 22:34
7bc86c3 to
947a5e5
Compare
topointon-jump
force-pushed
the
firedancer-geo-aware-leader-schedule-simd-0675
branch
from
October 21, 2026 22:14
250af9f to
48480c1
Compare
topointon-jump
force-pushed
the
firedancer-geo-aware-leader-schedule-simd-0675
branch
from
October 21, 2026 22:19
48480c1 to
9f37878
Compare
topointon-jump
force-pushed
the
firedancer-geo-aware-leader-schedule-simd-0675
branch
from
October 22, 2026 01:14
f34c7d1 to
fc2336c
Compare
topointon-jump
force-pushed
the
firedancer-geo-aware-leader-schedule-simd-0675
branch
from
October 22, 2026 01:23
fc2336c to
4aa0987
Compare
mjain-jump
reviewed
Oct 22, 2026
| fd_vote_account_location( uchar const * data, | ||
| ulong data_sz ) { | ||
| if( !fd_vote_account_is_valid_v5( data, data_sz ) ) return (fd_validator_location_t){0}; | ||
| return FD_LOAD( fd_validator_location_t, data+V5_OFF( location ) ); |
mjain-jump
reviewed
Oct 22, 2026
| } | ||
|
|
||
| uchar const no_bls[ FD_BLS_PUBKEY_COMPRESSED_SZ ] = {0}; | ||
| fd_validator_location_t const no_loc = {0}; |
Contributor
There was a problem hiding this comment.
just leaving this here because this is probably something we'll want to fuzz later
This branch has not been deployed
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.


Implements SIMD-0675: Geo-Aware Leader Schedule