Skip to content

flamenco, runtime: SIMD-0674 validator location registration - #12319

Open
topointon-jump wants to merge 1 commit into
firedancer-geo-aware-leader-schedule-vote-state-v5from
firedancer-geo-aware-leader-schedule-simd-0674
Open

topointon-jump wants to merge 1 commit into
firedancer-geo-aware-leader-schedule-vote-state-v5from
firedancer-geo-aware-leader-schedule-simd-0674

Conversation

@topointon-jump

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

Copy link
Copy Markdown
Contributor

@topointon-jump
topointon-jump added this pull request to stack #12320 October 16, 2026 04:08
@github-actions

github-actions Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
 ┌─ ⚡ PERF · 1a9efce vs main@88d4449 ─────────────────────────────────
 │ SUITE                               BASELINE          NEW         Δ
 │ replay tps, mainnet               30,220 tps   30,288 tps  ·  +0.22%
 │ bench tps, localnet              667,615 tps  666,468 tps  ·  -0.17%
 │ snapshot load, testnet                3.74 s       3.72 s  ·  -0.37%
 │ 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.44 s       3.42 s  ·  -0.74%
 │ binary size, firedancer             60.13 MB     60.13 MB  ·  +0.01%
 ├─────────────────────────────────────────────────────────────────────
@@ 0 REGRESSIONS · 0 WARNINGS · 0 IMPROVED · 8 NOISE @@
 └─────────────────────────────────────────────────────────────────────
history · 11 pushes
 ┌─ HISTORY · Δ vs main, per push, newest first ──────────────────────────────────
 │ HEAD         TPS    BENCH     SNAP    MEM·M    MEM·T     AG·M  COMPILE   BINARY
 │ 1a9efce   +0.22%   -0.17%   -0.37%    0.00%    0.00%    0.00%   -0.74%   +0.01%
 │ d922d33   +0.17%   +0.02%   +0.14%    0.00%    0.00%    0.00%   -0.35%   +0.01%
 │ 7083468   -0.40%   +0.10%   -0.53%    0.00%    0.00%    0.00%   +1.29%   +0.01%
 │ c9b72ee   -0.42%   +0.08%   +0.05%    0.00%    0.00%    0.00%   +0.39%   +0.01%
!│ 74642cd   -0.80%   -0.40%   -0.55%    0.00%    0.00%    0.00%   +0.03%   +0.01%
!│ dbb7397   -0.97%   +0.95%   -0.48%    0.00%    0.00%    0.00%   -0.23%   +0.01%
 │ db8f8d7        …   +0.33%        …        …        …        …        …        …
+│ 4adc5eb   -0.87%   -0.06%   +0.20%    0.00%    0.00%    0.00%   -0.48%   +0.01%
-│ fd80150   +0.46%   +0.31%   +4.92%    0.00%    0.00%    0.00%        …   +0.01%
 │ ccd2902   +0.62%   -0.29%   +1.04%    0.00%    0.00%    0.00%   +1.85%   +0.01%
 │ edf27c6        …        …        …        …        …        …        …        …
 └────────────────────────────────────────────────────────────────────────────────

@topointon-jump
topointon-jump force-pushed the firedancer-geo-aware-leader-schedule-simd-0674 branch from 88e7b62 to edf27c6 Compare October 16, 2026 17:42
Copilot AI balanced review requested due to automatic review settings October 16, 2026 17:42
@topointon-jump
topointon-jump force-pushed the firedancer-geo-aware-leader-schedule-simd-0674 branch from edf27c6 to ccd2902 Compare October 16, 2026 17:44

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

This explicitly unfinished change affects consensus-sensitive vote-state migration and needs protocol validation, runtime test execution, and final human review.

0 open findings

What changed in this PR

Adds SIMD-0674 validator location registration to Firedancer’s vote program, including location validation and migration to vote-state v5.

Changes:

  • Adds feature-gated location updates authorized by the current voter.
  • Extends instruction decoding and v5 conversion to carry coordinates.
  • Adds validation, authorization, migration, and error-path tests.
File Description
src/​flamenco/​runtime/​test_vat_refresh_vote_accounts.c Supplies location during test conversion.
src/​flamenco/​runtime/​program/​vote/​test_vote_state_v5.c Verifies location survives v5 conversion.
src/​flamenco/​runtime/​program/​vote/​test_vote_codec.c Tests location instruction decoding.
src/​flamenco/​runtime/​program/​vote/​test_validator_location.c Tests coordinate validation and boundaries.
src/​flamenco/​runtime/​program/​vote/​Local.mk Registers location validation tests.
src/​flamenco/​runtime/​program/​vote/​fd_vote_state_versioned.h Adds location to the conversion API.
src/​flamenco/​runtime/​program/​vote/​fd_vote_state_versioned.c Stores location during v5 conversion.
src/​flamenco/​runtime/​program/​vote/​fd_vote_codec.h Defines the location update instruction.
src/​flamenco/​runtime/​program/​vote/​fd_vote_codec.c Decodes signed coordinates.
src/​flamenco/​runtime/​program/​vote/​fd_validator_location.h Implements geographic validity checks.
src/​flamenco/​runtime/​program/​test_vote_program.c Tests updates, migration, authorization, and failures.
src/​flamenco/​runtime/​program/​fd_vote_program.c Handles feature-gated location updates.
src/​flamenco/​runtime/​fd_runtime.h Adds location handler scratch state.
src/​flamenco/​features/​feature_map.json Registers the feature with a placeholder key.
src/​flamenco/​features/​fd_features_generated.h Updates generated feature declarations.
src/​flamenco/​features/​fd_features_generated.c Updates generated feature lookup data.
src/​flamenco/​alpenglow/​test_alpenglow_v5.c Supplies location in Alpenglow test conversions.
src/​discof/​backup/​test_snap_roundtrip.c Supplies location in snapshot test conversions.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Copilot AI balanced review requested due to automatic review settings October 16, 2026 17:45

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-sensitive migration needs human protocol validation, a finalized feature key, and execution of the relevant tests.

0 open findings

🧠 Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings October 16, 2026 21:10
@topointon-jump
topointon-jump force-pushed the firedancer-geo-aware-leader-schedule-simd-0674 branch from ccd2902 to fd80150 Compare October 16, 2026 21:10

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 consensus-sensitive WIP migration needs human SIMD-conformance review and validation through the affected tests.

No open issues 🎉

Review effort: Balanced

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-0674 branch from fd80150 to 4adc5eb 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.

🟡 Changes recommended

Feature activation enables V5 registration without the corresponding V5-compatible stake-program upgrade.

1 open issue

Review effort: Balanced

Comment on lines +649 to +651
if( FD_UNLIKELY( FD_FEATURE_JUST_ACTIVATED_BANK( bank, validator_location_registration ) ) ) {
/* TODO: upgrade the stake program to support vote state v5 */
}
@topointon-jump
topointon-jump force-pushed the firedancer-geo-aware-leader-schedule-simd-0674 branch from 4adc5eb to db8f8d7 Compare October 19, 2026 19:14
Copilot AI balanced review requested due to automatic review settings October 19, 2026 19: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

Feature activation enables V5 conversions while the corresponding stake-program upgrade remains unfinished.

1 open issue

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-0674 branch from db8f8d7 to dbb7397 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 stake-program upgrade needed to support converted V5 vote accounts remains unimplemented.

1 open issue

Review effort: Balanced

@topointon-jump topointon-jump changed the title [WIP] flamenco, runtime: SIMD-0674 validator location registration flamenco, runtime: SIMD-0674 validator location registration Oct 19, 2026
@topointon-jump
topointon-jump force-pushed the firedancer-geo-aware-leader-schedule-simd-0674 branch from 74642cd to c9b72ee Compare October 19, 2026 22:33
Copilot AI balanced review requested due to automatic review settings October 19, 2026 22:33

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

Feature activation still omits the stake-program upgrade needed to support newly converted V5 vote accounts.

1 open issue

Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings October 19, 2026 22:43
@topointon-jump
topointon-jump force-pushed the firedancer-geo-aware-leader-schedule-simd-0674 branch from c9b72ee to 8106420 Compare October 19, 2026 22:43
@topointon-jump
topointon-jump force-pushed the firedancer-geo-aware-leader-schedule-simd-0674 branch from 8106420 to 7083468 Compare October 19, 2026 22:46

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

Feature activation permits V5 vote-account conversion while leaving the required V5-compatible stake-program upgrade unfinished.

1 open issue

Review effort: Balanced

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

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 activation-time stake-program upgrade needed to support converted V5 vote accounts remains unimplemented.

1 open issue

Review effort: Balanced

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

Feature activation still omits the V5-compatible stake-program upgrade needed for converted vote accounts.

1 open issue

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-0674 branch from d922d33 to 1a9efce 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.

🟡 Changes recommended

Registration can disable Tower voting and writes a vote-state layout incompatible with the linked SIMD-0674 specification.

3 open issues

Review effort: Balanced

/* Convert the vote state account to a V5 vote account if it isn't already */
if( versioned->kind!=fd_vote_state_versioned_enum_v5 ) {
if( FD_UNLIKELY( fd_borrowed_account_get_data_len( vote_account )!=FD_VOTE_STATE_V5_SZ ) ) return FD_EXECUTOR_INSTR_ERR_INVALID_ACC_DATA;
rc = fd_vsv_try_convert_to_v5( versioned, clock->epoch );
/* Now, we can set the location */
versioned->v5.location = *location;

return fd_vsv_set_vote_account_state( ctx, vote_account, versioned );

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.

2 participants