leaderschedule

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 11, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LeaderSchedule

type LeaderSchedule struct {
	// contains filtered or unexported fields
}

func New

func New(
	epochVoteAcctsMap map[solana.PublicKey]*epochstakes.VoteAccount,
	epochVoteAcctStakes map[solana.PublicKey]uint64,
	epochSchedule *sealevel.SysvarEpochSchedule,
	epoch uint64,
	length uint64,
	repeat uint64) *LeaderSchedule

func NewLeaderScheduleFromKeyedSlots

func NewLeaderScheduleFromKeyedSlots(ls map[solana.PublicKey][]uint64, epochStartSlot uint64) *LeaderSchedule

func (*LeaderSchedule) LeaderForSlot

func (ls *LeaderSchedule) LeaderForSlot(slot uint64) (solana.PublicKey, bool)

type TieBreakEntry

type TieBreakEntry struct {
	Rank     int
	NodePk   solana.PublicKey
	Stake    uint64
	RawBytes []byte // First 8 bytes of pubkey for comparison
	BytesCmp int    // Comparison result vs previous entry
}

TieBreakEntry represents an entry in a tie-break group for debugging

func GetSortedStakesDebug

func GetSortedStakesDebug(
	epochVoteAcctsMap map[solana.PublicKey]*epochstakes.VoteAccount,
	epochVoteAcctStakes map[solana.PublicKey]uint64,
) ([]TieBreakEntry, map[uint64][]TieBreakEntry)

GetSortedStakesDebug returns sorted stakes with tie-break debugging info. Used to verify tie-break ordering matches Agave's vote-keyed schedule. NOTE: This now uses VOTE ACCOUNT pubkeys for sorting (not node identities) to match the actual leader schedule computation.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL