Versions in this module Expand all Collapse all v0 v0.2.0 May 11, 2026 Changes in this version + const StakeIndexRecordSize + const StakeIndexVersion + var ErrNoAccount = errors.New("ErrNoAccount") + var StakeIndexMagic = [4]byte + var StoreAccountsWorkers = 128 + func BuildIndexEntriesFromAppendVecs(data []byte, fileSize uint64, slot uint64, fileId uint64) ([]solana.PublicKey, []AccountIndexEntry, []StakeIndexEntry, error) + func GetAppendVecDataLen(f *os.File, offset uint64) (uint64, error) + func NewAccountsIndexPebbleOptions(logger pebble.Logger) *pebble.Options + func WriteStakePubkeyIndex(path string, entries []StakeIndexEntry) error + type AccountIndexEntry struct + FileId uint64 + Offset uint64 + Slot uint64 + func UnmarshalAcctIdxEntry(data []byte) (*AccountIndexEntry, error) + func (entry *AccountIndexEntry) Unmarshal(in *[24]byte) + func (entry AccountIndexEntry) Marshal(out *[24]byte) + type AccountsDb struct + AcctsDir string + BankHashStore *pebble.DB + CommonAcctsCache otter.Cache[solana.PublicKey, *accounts.Account] + Index *pebble.DB + LargestFileId atomic.Uint64 + ProgramCache otter.Cache[solana.PublicKey, *ProgramCacheEntry] + VoteAcctCache otter.Cache[solana.PublicKey, *accounts.Account] + func OpenDb(accountsDbDir string) (*AccountsDb, error) + func (accountsDb *AccountsDb) AddProgramToCache(pubkey solana.PublicKey, programEntry *ProgramCacheEntry) + func (accountsDb *AccountsDb) AllKeys() [][]byte + func (accountsDb *AccountsDb) CloseDb() + func (accountsDb *AccountsDb) GetAccount(slot uint64, pubkey solana.PublicKey) (*accounts.Account, error) + func (accountsDb *AccountsDb) GetBankHashForSlot(slot uint64) ([]byte, error) + func (accountsDb *AccountsDb) InitCaches() + func (accountsDb *AccountsDb) KeysBetweenPrefixes(startPrefix uint64, endPrefix uint64) []solana.PublicKey + func (accountsDb *AccountsDb) MaybeGetProgramFromCache(pubkey solana.PublicKey) (*ProgramCacheEntry, bool) + func (accountsDb *AccountsDb) RemoveProgramFromCache(pubkey solana.PublicKey) + func (accountsDb *AccountsDb) StoreAccounts(accts []*accounts.Account, slot uint64, cb func()) error + func (accountsDb *AccountsDb) StoreBankHashForSlot(slot uint64, bankHash []byte) error + func (accountsDb *AccountsDb) StoreQueueLen() int + func (accountsDb *AccountsDb) WaitForStoreWorker() + func (db *AccountsDb) GetAccountsBatch(ctx context.Context, slot uint64, pks []solana.PublicKey) ([]*accounts.Account, error) + type AppendVecAccount struct + Data []byte + DataLen uint64 + Executable bool + Hash [32]byte + Lamports uint64 + Owner solana.PublicKey + Padding [7]byte + Pubkey solana.PublicKey + RentEpoch uint64 + WriteVersion uint64 + func (acct *AppendVecAccount) Marshal(buf io.Writer) error + func (acct *AppendVecAccount) MarshalReturningLength(buf io.Writer) (int, error) + func (acct *AppendVecAccount) Unmarshal(buf io.Reader) error + func (appendVecAcct *AppendVecAccount) ToAccount() *accounts.Account + type ProgramCacheEntry struct + DeploymentSlot uint64 + Program *sbpf.Program + type StakeIndexEntry struct + FileId uint64 + Offset uint64 + Pubkey solana.PublicKey v0.1.0-alpha.1 Jan 15, 2026