|
|
@ -481,6 +481,10 @@ func InspectDatabase(db ethdb.Database, keyPrefix, keyStart []byte) error { |
|
|
|
beaconHeaders stat |
|
|
|
beaconHeaders stat |
|
|
|
cliqueSnaps stat |
|
|
|
cliqueSnaps stat |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Verkle statistics
|
|
|
|
|
|
|
|
verkleTries stat |
|
|
|
|
|
|
|
verkleStateLookups stat |
|
|
|
|
|
|
|
|
|
|
|
// Les statistic
|
|
|
|
// Les statistic
|
|
|
|
chtTrieNodes stat |
|
|
|
chtTrieNodes stat |
|
|
|
bloomTrieNodes stat |
|
|
|
bloomTrieNodes stat |
|
|
@ -550,6 +554,24 @@ func InspectDatabase(db ethdb.Database, keyPrefix, keyStart []byte) error { |
|
|
|
bytes.HasPrefix(key, BloomTrieIndexPrefix) || |
|
|
|
bytes.HasPrefix(key, BloomTrieIndexPrefix) || |
|
|
|
bytes.HasPrefix(key, BloomTriePrefix): // Bloomtrie sub
|
|
|
|
bytes.HasPrefix(key, BloomTriePrefix): // Bloomtrie sub
|
|
|
|
bloomTrieNodes.Add(size) |
|
|
|
bloomTrieNodes.Add(size) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Verkle trie data is detected, determine the sub-category
|
|
|
|
|
|
|
|
case bytes.HasPrefix(key, VerklePrefix): |
|
|
|
|
|
|
|
remain := key[len(VerklePrefix):] |
|
|
|
|
|
|
|
switch { |
|
|
|
|
|
|
|
case IsAccountTrieNode(remain): |
|
|
|
|
|
|
|
verkleTries.Add(size) |
|
|
|
|
|
|
|
case bytes.HasPrefix(remain, stateIDPrefix) && len(remain) == len(stateIDPrefix)+common.HashLength: |
|
|
|
|
|
|
|
verkleStateLookups.Add(size) |
|
|
|
|
|
|
|
case bytes.Equal(remain, persistentStateIDKey): |
|
|
|
|
|
|
|
metadata.Add(size) |
|
|
|
|
|
|
|
case bytes.Equal(remain, trieJournalKey): |
|
|
|
|
|
|
|
metadata.Add(size) |
|
|
|
|
|
|
|
case bytes.Equal(remain, snapSyncStatusFlagKey): |
|
|
|
|
|
|
|
metadata.Add(size) |
|
|
|
|
|
|
|
default: |
|
|
|
|
|
|
|
unaccounted.Add(size) |
|
|
|
|
|
|
|
} |
|
|
|
default: |
|
|
|
default: |
|
|
|
var accounted bool |
|
|
|
var accounted bool |
|
|
|
for _, meta := range [][]byte{ |
|
|
|
for _, meta := range [][]byte{ |
|
|
@ -590,6 +612,8 @@ func InspectDatabase(db ethdb.Database, keyPrefix, keyStart []byte) error { |
|
|
|
{"Key-Value store", "Path trie state lookups", stateLookups.Size(), stateLookups.Count()}, |
|
|
|
{"Key-Value store", "Path trie state lookups", stateLookups.Size(), stateLookups.Count()}, |
|
|
|
{"Key-Value store", "Path trie account nodes", accountTries.Size(), accountTries.Count()}, |
|
|
|
{"Key-Value store", "Path trie account nodes", accountTries.Size(), accountTries.Count()}, |
|
|
|
{"Key-Value store", "Path trie storage nodes", storageTries.Size(), storageTries.Count()}, |
|
|
|
{"Key-Value store", "Path trie storage nodes", storageTries.Size(), storageTries.Count()}, |
|
|
|
|
|
|
|
{"Key-Value store", "Verkle trie nodes", verkleTries.Size(), verkleTries.Count()}, |
|
|
|
|
|
|
|
{"Key-Value store", "Verkle trie state lookups", verkleStateLookups.Size(), verkleStateLookups.Count()}, |
|
|
|
{"Key-Value store", "Trie preimages", preimages.Size(), preimages.Count()}, |
|
|
|
{"Key-Value store", "Trie preimages", preimages.Size(), preimages.Count()}, |
|
|
|
{"Key-Value store", "Account snapshot", accountSnaps.Size(), accountSnaps.Count()}, |
|
|
|
{"Key-Value store", "Account snapshot", accountSnaps.Size(), accountSnaps.Count()}, |
|
|
|
{"Key-Value store", "Storage snapshot", storageSnaps.Size(), storageSnaps.Count()}, |
|
|
|
{"Key-Value store", "Storage snapshot", storageSnaps.Size(), storageSnaps.Count()}, |
|
|
|