-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Prune ancient data doesn't work in case PathScheme or TrieDirtyDisabled #2923
Copy link
Copy link
Closed as not planned
Closed as not planned
Copy link
Description
Lines 1828 to 1836 in df229e7
| // If node is running in path mode, skip explicit gc operation | |
| // which is unnecessary in this mode. | |
| if bc.triedb.Scheme() == rawdb.PathScheme { | |
| return nil | |
| } | |
| // If we're running an archive node, always flush | |
| if bc.cacheConfig.TrieDirtyDisabled { | |
| return bc.triedb.Commit(root, false) | |
| } |
In either of these two cases, we miss rawdb.WriteSafePointBlockNumber
So, which causes the ancient pruning check to fail
bsc/core/rawdb/prunedfreezer.go
Lines 269 to 274 in 82e0d8c
| stableStabeNumber := ReadSafePointBlockNumber(nfdb) | |
| switch { | |
| case stableStabeNumber < params.StableStateThreshold: | |
| log.Debug("Stable state block not old enough", "number", stableStabeNumber) | |
| backoff = true | |
| continue |
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels