Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 0 additions & 43 deletions pkg/accountsdb/accountsdb.go
Original file line number Diff line number Diff line change
Expand Up @@ -196,24 +196,6 @@ type ProgramCacheEntry struct {
DeploymentSlot uint64
}

type PebbleMetricsSnapshot struct {
BlockCacheHits int64
BlockCacheMisses int64
BlockCacheSize int64
TableCacheHits int64
TableCacheMisses int64
TableCacheSize int64
ReadAmp int
CompactionDebt uint64
L0NumFiles int64
L0Sublevels int32
MemTableSize uint64
MemTableCount int64
WALFiles int64
WALSize uint64
WALBytesWritten uint64
}

func (accountsDb *AccountsDb) MaybeGetProgramFromCache(pubkey solana.PublicKey) (*ProgramCacheEntry, bool) {
return accountsDb.ProgramCache.Get(pubkey)
}
Expand All @@ -226,31 +208,6 @@ func (accountsDb *AccountsDb) RemoveProgramFromCache(pubkey solana.PublicKey) {
accountsDb.ProgramCache.Delete(pubkey)
}

func (accountsDb *AccountsDb) IndexMetricsSnapshot() PebbleMetricsSnapshot {
if accountsDb == nil || accountsDb.Index == nil {
return PebbleMetricsSnapshot{}
}

metrics := accountsDb.Index.Metrics()
return PebbleMetricsSnapshot{
BlockCacheHits: metrics.BlockCache.Hits,
BlockCacheMisses: metrics.BlockCache.Misses,
BlockCacheSize: metrics.BlockCache.Size,
TableCacheHits: metrics.TableCache.Hits,
TableCacheMisses: metrics.TableCache.Misses,
TableCacheSize: metrics.TableCache.Size,
ReadAmp: metrics.ReadAmp(),
CompactionDebt: metrics.Compact.EstimatedDebt,
L0NumFiles: metrics.Levels[0].NumFiles,
L0Sublevels: metrics.Levels[0].Sublevels,
MemTableSize: metrics.MemTable.Size,
MemTableCount: metrics.MemTable.Count,
WALFiles: metrics.WAL.Files,
WALSize: metrics.WAL.Size,
WALBytesWritten: metrics.WAL.BytesWritten,
}
}

func (accountsDb *AccountsDb) GetAccount(slot uint64, pubkey solana.PublicKey) (*accounts.Account, error) {
accts := accountsDb.getStoreInProgressAccounts([]solana.PublicKey{pubkey})
if accts[0] != nil {
Expand Down
7 changes: 5 additions & 2 deletions pkg/features/gates.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ var PicoInflation = FeatureGate{Name: "PicoInflation", Address: base58.MustDecod
var DisableAccountLoaderSpecialCase = FeatureGate{Name: "DisableAccountLoaderSpecialCase", Address: base58.MustDecodeFromString("EQUMpNFr7Nacb1sva56xn1aLfBxppEoSBH8RRVdkcD1x")}
var EnableGetEpochStakeSyscall = FeatureGate{Name: "EnableGetEpochStakeSyscall", Address: base58.MustDecodeFromString("FKe75t4LXxGaQnVHdUKM6DSFifVVraGZ8LyNo7oPwy1Z")}
var ReserveMinimalCUsForBuiltinInstructions = FeatureGate{Name: "ReserveMinimalCUsForBuiltinInstructions", Address: base58.MustDecodeFromString("C9oAhLxDBm3ssWtJx1yBGzPY55r2rArHmN1pbQn6HogH")}
var RelaxIntraBatchAccountLocks = FeatureGate{Name: "RelaxIntraBatchAccountLocks", Address: base58.MustDecodeFromString("4WeHX6QoXCCwqbSFgi6dxnB6QsPo6YApaNTH7P4MLQ99")}
var MaskOutRentEpochInVmSerialization = FeatureGate{Name: "MaskOutRentEpochInVmSerialization", Address: base58.MustDecodeFromString("RENtePQcDLrAbxAsP3k8dwVcnNYQ466hi2uKvALjnXx")}
var RemoveAccountsExecutableFlagChecks = FeatureGate{Name: "RemoveAccountsExecutableFlagchecks", Address: base58.MustDecodeFromString("FXs1zh47QbNnhXcnB6YiAQoJ4sGB91tKF3UFHLcKT7PM")}
var AccountsLtHash = FeatureGate{Name: "AccountsLtHash", Address: base58.MustDecodeFromString("LTHasHQX6661DaDD4S6A2TFi6QBuiwXKv66fB1obfHq")}
Expand All @@ -66,6 +67,8 @@ var FixAltBn128PairingLengthCheck = FeatureGate{Name: "FixAltBn128PairingLengthC
var DeprecateRentExemptionThreshold = FeatureGate{Name: "DeprecateRentExemptionThreshold", Address: base58.MustDecodeFromString("rent6iVy6PDoViPBeJ6k5EJQrkj62h7DPyLbWGHwjrC")}
var ProvideInstructionDataOffsetInVmR2 = FeatureGate{Name: "ProvideInstructionDataOffsetInVmR2", Address: base58.MustDecodeFromString("5xXZc66h4UdB6Yq7FzdBxBiRAFMMScMLwHxk2QZDaNZL")}
var VoteStateV4 = FeatureGate{Name: "VoteStateV4", Address: base58.MustDecodeFromString("Gx4XFcrVMt4HUvPzTpTSVkdDVgcDSjKhDN1RqRS6KDuZ")}
var RelaxProgramdataAccountCheckMigration = FeatureGate{Name: "RelaxProgramdataAccountCheckMigration", Address: base58.MustDecodeFromString("rexav5eNTUSNT1K2N7cfRjnthwhcP5BC25v2tA4rW4h")}
var ReplaceSplTokenWithPToken = FeatureGate{Name: "ReplaceSplTokenWithPToken", Address: base58.MustDecodeFromString("ptokFjwyJtrwCa9Kgo9xoDS59V4QccBGEaRFnRPnSdP")}

var AllFeatureGates = []FeatureGate{StopTruncatingStringsInSyscalls, EnablePartitionedEpochReward, EnablePartitionedEpochRewardsSuperfeature,
LastRestartSlotSysvar, Libsecp256k1FailOnBadCount, Libsecp256k1FailOnBadCount2, EnableBpfLoaderSetAuthorityCheckedIx,
Expand All @@ -78,9 +81,9 @@ var AllFeatureGates = []FeatureGate{StopTruncatingStringsInSyscalls, EnableParti
RewardFullPriorityFee, StakeMinimumDelegationForRewards, MoveStakeAndMoveLamportsIxs, GetSysvarSyscallEnabled,
AddNewReservedAccountKeys, EnableSecp256r1Precompile, FixAltBn128MultiplicationInputLength, EnableTowerSyncIx, SkipRentRewrites,
FullInflationVote, FullInflationEnable, FullInflationDevnetAndTestnet, PicoInflation, DisableAccountLoaderSpecialCase, EnableGetEpochStakeSyscall,
ReserveMinimalCUsForBuiltinInstructions, MaskOutRentEpochInVmSerialization, RemoveAccountsExecutableFlagChecks,
ReserveMinimalCUsForBuiltinInstructions, RelaxIntraBatchAccountLocks, MaskOutRentEpochInVmSerialization, RemoveAccountsExecutableFlagChecks,
AccountsLtHash, RemoveAccountsDeltaHash, EnableLoaderV4, EnableSbpfV1DeploymentAndExecution, EnableSbpfV2DeploymentAndExecution,
EnableSbpfV3DeploymentAndExecution, DisableSbpfV0Execution, ReenableSbpfV0Execution, FormalizeLoadedTransactionDataSize, IncreaseCpiAccountInfoLimit,
StaticInstructionLimit, PoseidonEnforcePadding, FixAltBn128PairingLengthCheck, DeprecateRentExemptionThreshold,
ProvideInstructionDataOffsetInVmR2,
VoteStateV4}
VoteStateV4, RelaxProgramdataAccountCheckMigration, ReplaceSplTokenWithPToken}
Loading
Loading