Skip to content

feat: new leader schedule by vote delegation (SIMD-0180)#4597

Merged
jstarry merged 2 commits intoanza-xyz:masterfrom
jstarry:feat/leader-schedule-migration
Mar 17, 2025
Merged

feat: new leader schedule by vote delegation (SIMD-0180)#4597
jstarry merged 2 commits intoanza-xyz:masterfrom
jstarry:feat/leader-schedule-migration

Conversation

@jstarry
Copy link
Copy Markdown

@jstarry jstarry commented Jan 23, 2025

Problem

SIMD-0180 proposes a new change to the leader schedule algorithm to use vote account delegations rather than total node delegations.

Summary of Changes

  • Switch over to the new leader schedule algorithm using a feature gate. The new leader schedule algorithm will be applied two epochs after the feature gate activation epoch.

  • A new vote_keyed::LeaderSchedule struct was added which also implements the LeaderScheduleVariant trait.

Fixes #
Feature Gate Issue: #4573

@jstarry jstarry force-pushed the feat/leader-schedule-migration branch from d32331b to 9f16cee Compare January 28, 2025 13:06
@joncinque
Copy link
Copy Markdown

This PR contains changes to the solana sdk, which will be moved to a new repo within the next week, when v2.2 is branched from master.

Please merge or close this PR as soon as possible, or re-create the sdk changes when the new repository is ready at https://github.com/anza-xyz/solana-sdk

@jstarry jstarry force-pushed the feat/leader-schedule-migration branch 9 times, most recently from bbd8566 to 4b7393e Compare February 6, 2025 10:39
@jstarry jstarry marked this pull request as ready for review February 6, 2025 10:41
AshwinSekar
AshwinSekar previously approved these changes Feb 11, 2025
Copy link
Copy Markdown

@AshwinSekar AshwinSekar left a comment

Choose a reason for hiding this comment

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

Logic looks correct, I like exposing slot_leaders so we don't have to perform an additional lookup

@jstarry
Copy link
Copy Markdown
Author

jstarry commented Feb 12, 2025

Thanks for the review @AshwinSekar, I'll rebase once it's clear where this new feature gate key should be added now that sdk is in a separate repo

@t-nelson
Copy link
Copy Markdown

can we ref the simd in the title?

Comment thread ledger/src/leader_schedule.rs Outdated
Comment thread ledger/src/leader_schedule.rs Outdated
Comment thread ledger/src/leader_schedule.rs Outdated
Comment thread runtime/src/bank.rs Outdated
@jstarry jstarry changed the title feat: new leader schedule by vote delegation feat: new leader schedule by vote delegation (SIMD-0180) Feb 13, 2025
@jstarry jstarry force-pushed the feat/leader-schedule-migration branch from 4b7393e to 4956850 Compare February 13, 2025 18:07
@jstarry jstarry force-pushed the feat/leader-schedule-migration branch from bd48e40 to 4e99ae7 Compare February 27, 2025 18:33
@jstarry jstarry force-pushed the feat/leader-schedule-migration branch 5 times, most recently from 5264fce to e0f8f06 Compare March 5, 2025 01:19
@jstarry
Copy link
Copy Markdown
Author

jstarry commented Mar 5, 2025

@t-nelson @AshwinSekar this is ready for another review pass. I've rebased on master to pick up the new leader schedule trait introduced in #4973.

Copy link
Copy Markdown

@AshwinSekar AshwinSekar left a comment

Choose a reason for hiding this comment

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

Logic looks correct, will wait for trent's approval

Comment thread ledger/src/leader_schedule/vote_keyed.rs
Comment thread ledger/src/leader_schedule.rs Outdated
Comment thread ledger/src/leader_schedule_utils.rs Outdated
@t-nelson
Copy link
Copy Markdown

@mergify rebase

@mergify
Copy link
Copy Markdown

mergify Bot commented Mar 11, 2025

rebase

❌ Base branch update has failed

Details

t-nelson token is invalid, make sure t-nelson can still log in on the Mergify dashboard.

@jstarry jstarry force-pushed the feat/leader-schedule-migration branch from f2bb136 to c7d917b Compare March 11, 2025 18:17
@jstarry jstarry requested a review from t-nelson March 11, 2025 19:38
@jstarry jstarry merged commit bc09ffa into anza-xyz:master Mar 17, 2025
@jstarry jstarry deleted the feat/leader-schedule-migration branch March 17, 2025 22:30
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.

4 participants