add option for hotstore message retention
This commit is contained in:
parent
fd9f5dc83c
commit
1b77361301
@ -71,6 +71,13 @@ type Config struct {
|
||||
// which skips moving (as it is a noop, but still takes time to read all the cold objects)
|
||||
// and directly purges cold blocks.
|
||||
DiscardColdBlocks bool
|
||||
|
||||
// HotstoreMessageRetention indicates the hotstore retention policy for messages.
|
||||
// It has the following semantics:
|
||||
// - a value of 0 will only retain messages within the compaction boundary (4 finalities)
|
||||
// - a positive integer indicates the number of finalities, outside the compaction boundary,
|
||||
// for which messages will be retained in the hotstore.
|
||||
HotStoreMessageRetention uint64
|
||||
}
|
||||
|
||||
// ChainAccessor allows the Splitstore to access the chain. It will most likely
|
||||
|
@ -251,6 +251,8 @@ type Splitstore struct {
|
||||
ColdStoreType string
|
||||
HotStoreType string
|
||||
MarkSetType string
|
||||
|
||||
HotStoreMessageRetention uint64
|
||||
}
|
||||
|
||||
// // Full Node
|
||||
|
@ -78,8 +78,9 @@ func SplitBlockstore(cfg *config.Chainstore) func(lc fx.Lifecycle, r repo.Locked
|
||||
}
|
||||
|
||||
cfg := &splitstore.Config{
|
||||
MarkSetType: cfg.Splitstore.MarkSetType,
|
||||
DiscardColdBlocks: cfg.Splitstore.ColdStoreType == "discard",
|
||||
MarkSetType: cfg.Splitstore.MarkSetType,
|
||||
DiscardColdBlocks: cfg.Splitstore.ColdStoreType == "discard",
|
||||
HotStoreMessageRetention: cfg.Splitstore.HotStoreMessageRetention,
|
||||
}
|
||||
ss, err := splitstore.Open(path, ds, hot, cold, cfg)
|
||||
if err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user