Skip to content

disco, flamenco: SIMD-0675 geo-aware leader schedule - #12402

Open
topointon-jump wants to merge 1 commit into
firedancer-geo-aware-leader-schedule-mandatory-validator-locationfrom
firedancer-geo-aware-leader-schedule-simd-0675
Open

topointon-jump wants to merge 1 commit into
firedancer-geo-aware-leader-schedule-mandatory-validator-locationfrom
firedancer-geo-aware-leader-schedule-simd-0675

Conversation

@topointon-jump

@topointon-jump topointon-jump commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

@topointon-jump
topointon-jump added this pull request to stack #12320 October 19, 2026 02:54
@github-actions

github-actions Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
 ┌─ ⚡ 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 topointon-jump changed the title disco, flamenco: SIMD-0675 geo-aware leader schedule [WIP] disco, flamenco: SIMD-0675 geo-aware leader schedule Oct 19, 2026
Copilot AI balanced review requested due to automatic review settings October 19, 2026 03:20
@topointon-jump
topointon-jump force-pushed the firedancer-geo-aware-leader-schedule-simd-0675 branch from 2c2331d to 489405c Compare October 19, 2026 03:21

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 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

Comment thread src/flamenco/leaders/fd_leaders.c
Comment thread src/disco/shred/fd_stake_ci.c
Copilot AI balanced review requested due to automatic review settings October 19, 2026 15:50
@topointon-jump
topointon-jump force-pushed the firedancer-geo-aware-leader-schedule-simd-0675 branch from 489405c to 8727b1c Compare October 19, 2026 15:50

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Consensus-critical ordering and snapshot compatibility require cross-client validation and human review before approving this WIP.

2 open issues

Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings October 19, 2026 19:15
@topointon-jump
topointon-jump force-pushed the firedancer-geo-aware-leader-schedule-simd-0675 branch from 8727b1c to b63771c Compare October 19, 2026 19:15

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

These WIP consensus-sensitive scheduling and snapshot changes need independent protocol validation and executed project tests before human approval.

2 open issues

Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings October 19, 2026 19:24
@topointon-jump
topointon-jump force-pushed the firedancer-geo-aware-leader-schedule-simd-0675 branch from b63771c to 253dd00 Compare October 19, 2026 19:24

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The work-in-progress changes affect consensus scheduling and snapshot compatibility and need human validation before approval.

2 open issues

Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings October 19, 2026 20:49
@topointon-jump
topointon-jump force-pushed the firedancer-geo-aware-leader-schedule-simd-0675 branch from 253dd00 to 7bc86c3 Compare October 19, 2026 20:49

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Consensus-critical scheduling and snapshot changes need human conformance review and executed test evidence.

2 open issues

Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings October 19, 2026 22:34
@topointon-jump
topointon-jump force-pushed the firedancer-geo-aware-leader-schedule-simd-0675 branch from 7bc86c3 to 947a5e5 Compare October 19, 2026 22:34
@topointon-jump
topointon-jump force-pushed the firedancer-geo-aware-leader-schedule-simd-0675 branch from 250af9f to 48480c1 Compare October 21, 2026 22:14

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Consensus-critical schedule generation and snapshot compatibility changes need final human review and full integration validation.

No open issues 🎉

5 resolved since last review

Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings October 21, 2026 22:19
@topointon-jump
topointon-jump force-pushed the firedancer-geo-aware-leader-schedule-simd-0675 branch from 48480c1 to 9f37878 Compare October 21, 2026 22:19

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Consensus-critical schedule ordering and snapshot interoperability require human review and end-to-end validation beyond the static review performed.

No open issues 🎉

Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings October 22, 2026 00:49

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Consensus-critical schedule ordering and snapshot compatibility require human review and cross-client validation.

No open issues 🎉

Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings October 22, 2026 00:55

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Consensus-critical leader ordering and snapshot compatibility changes require cross-client validation and final human review.

No open issues 🎉

Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings October 22, 2026 01:01

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Consensus-critical ordering and snapshot compatibility changes require human review and cross-client validation; project tests were not executed during this review.

No open issues 🎉

Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings October 22, 2026 01:07

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Consensus-critical scheduling and snapshot interoperability require cross-client validation and final human review.

No open issues 🎉

Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings October 22, 2026 01:14
@topointon-jump
topointon-jump force-pushed the firedancer-geo-aware-leader-schedule-simd-0675 branch from f34c7d1 to fc2336c Compare October 22, 2026 01:14

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Consensus-critical scheduling and snapshot compatibility changes require cross-client validation and final human review.

No open issues 🎉

Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings October 22, 2026 01:23
@topointon-jump
topointon-jump force-pushed the firedancer-geo-aware-leader-schedule-simd-0675 branch from fc2336c to 4aa0987 Compare October 22, 2026 01:23

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Consensus-critical scheduling and snapshot changes require human confirmation of cross-client determinism, activation behavior, and affected test results.

No open issues 🎉

Review effort: Balanced

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 ) );

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥

}

uchar const no_bls[ FD_BLS_PUBKEY_COMPRESSED_SZ ] = {0};
fd_validator_location_t const no_loc = {0};

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just leaving this here because this is probably something we'll want to fuzz later

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants