Repository navigation
flamenco, runtime: SIMD-0674 validator location registration - #12319
Open
topointon-jump wants to merge 1 commit into
Open
topointon-jump wants to merge 1 commit into
topointon-jump wants to merge 1 commit into
Conversation
topointon-jump
added this pull request to stack #12320
October 16, 2026 04:08
┌─ ⚡ 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
force-pushed
the
firedancer-geo-aware-leader-schedule-simd-0674
branch
from
October 16, 2026 17:42
88e7b62 to
edf27c6
Compare
topointon-jump
force-pushed
the
firedancer-geo-aware-leader-schedule-simd-0674
branch
from
October 16, 2026 17:44
edf27c6 to
ccd2902
Compare
Contributor
There was a problem hiding this comment.
🔵 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.
topointon-jump
force-pushed
the
firedancer-geo-aware-leader-schedule-simd-0674
branch
from
October 16, 2026 21:10
ccd2902 to
fd80150
Compare
topointon-jump
force-pushed
the
firedancer-geo-aware-leader-schedule-simd-0674
branch
from
October 19, 2026 15:50
fd80150 to
4adc5eb
Compare
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
force-pushed
the
firedancer-geo-aware-leader-schedule-simd-0674
branch
from
October 19, 2026 19:14
4adc5eb to
db8f8d7
Compare
topointon-jump
force-pushed
the
firedancer-geo-aware-leader-schedule-simd-0674
branch
from
October 19, 2026 19:24
db8f8d7 to
dbb7397
Compare
topointon-jump
force-pushed
the
firedancer-geo-aware-leader-schedule-simd-0674
branch
from
October 19, 2026 22:33
74642cd to
c9b72ee
Compare
topointon-jump
force-pushed
the
firedancer-geo-aware-leader-schedule-simd-0674
branch
from
October 19, 2026 22:43
c9b72ee to
8106420
Compare
topointon-jump
force-pushed
the
firedancer-geo-aware-leader-schedule-simd-0674
branch
from
October 19, 2026 22:46
8106420 to
7083468
Compare
topointon-jump
force-pushed
the
firedancer-geo-aware-leader-schedule-simd-0674
branch
from
October 21, 2026 20:13
7083468 to
d922d33
Compare
topointon-jump
force-pushed
the
firedancer-geo-aware-leader-schedule-simd-0674
branch
from
October 22, 2026 01:23
d922d33 to
1a9efce
Compare
| /* 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
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-0674: Validator Location Registration.