Versions in this module Expand all Collapse all v0 v0.2.0 May 11, 2026 Changes in this version + const VoteConfirmationTimeoutSlots + const VoteThresholdSize + var ErrDepthExceeded = errors.New("skip path: depth exceeded max allowed") + var ErrEquivocation = errors.New("skip path: observed conflicting blocks for the same slot") + var ErrNeedWait = errors.New("consensus: vote landing window not reached, need to wait") + var ErrNoPath = errors.New("skip path: no valid path found to target slot") + var ErrNoSupermajority = errors.New("consensus: no hash reached supermajority for target slot") + var ErrPathIncomplete = errors.New("skip path: path is incomplete and needs more observations") + type BankhashResult struct + StakeForHash uint64 + Status BankhashStatus + ThresholdStake uint64 + TotalEpochStake uint64 + WinningHash solana.Hash + WinningStake uint64 + type BankhashStatus int + const BankhashHasSupermajority + const BankhashNeedWait + const BankhashNoSupermajority + func (s BankhashStatus) String() string + type ConfirmedLeaf struct + Bankhash solana.Hash + Slot uint64 + type ConsensusCoordinator struct + func NewConsensusCoordinator(fc *ForkChoiceService, maxDepth int, policy string) *ConsensusCoordinator + func (cc *ConsensusCoordinator) Policy() string + func (cc *ConsensusCoordinator) ResolveFromAnchor(anchorSlot uint64) (*ResolvedPath, error) + type ForkChoiceService struct + func NewForkChoiceService(epoch uint64, epochStakes map[solana.PublicKey]uint64, totalEpochStake uint64, ...) *ForkChoiceService + func (s *ForkChoiceService) FindConfirmedLeaf(anchorSlot uint64, maxDepth int) (ConfirmedLeaf, error) + func (s *ForkChoiceService) GetSupermajorityHash(slot uint64) (solana.Hash, BankhashStatus) + func (s *ForkChoiceService) IsBankhashCorrect(slot uint64, bankHash solana.Hash) BankhashResult + func (s *ForkChoiceService) LatestObservedSlot() uint64 + func (s *ForkChoiceService) ObserveBlock(meta ObservedBlockMeta, txs []*solana.Transaction) error + func (s *ForkChoiceService) ObserveExecutionAnchor(slot uint64, blockhash solana.Hash) + func (s *ForkChoiceService) ObserveSkippedSlot(slot uint64) + func (s *ForkChoiceService) PruneBeforeSlot(slot uint64) + func (s *ForkChoiceService) ResolvePathToLeaf(anchorSlot uint64, leafSlot uint64, maxDepth int) (*SolveResult, error) + func (s *ForkChoiceService) Start() + func (s *ForkChoiceService) Stop() + func (s *ForkChoiceService) SubmitBlock(slot uint64, txs []*solana.Transaction) + func (s *ForkChoiceService) UpdateEpoch(epoch uint64, epochStakes map[solana.PublicKey]uint64, totalEpochStake uint64, ...) + type ObservedBlockMeta struct + Blockhash solana.Hash + ParentBlockhash solana.Hash + ParentSlot uint64 + ParentSlotKnown bool + Slot uint64 + type ResolvedPath struct + LeafBankhash solana.Hash + LeafSlot uint64 + SlotDecisions []SlotDecision + type SlotDecision struct + Slot uint64 + UseBlock bool + type SolveResult struct + MatchedSlot uint64 + Path []bool + func ResolvePohPath(anchorSlot uint64, leafSlot uint64, observed map[uint64]*ObservedBlockMeta, ...) (*SolveResult, error) v0.1.0-alpha.1 Jan 15, 2026