add (salted) bloom filter liveset
This commit is contained in:
+3
-3
@@ -611,10 +611,10 @@ func Repo(r repo.Repo) Option {
|
||||
Override(new(dtypes.UniversalBlockstore), modules.UniversalBlockstore),
|
||||
|
||||
If(cfg.EnableSplitstore,
|
||||
If(cfg.Splitstore.UseLMDBHotstore,
|
||||
Override(new(dtypes.HotBlockstore), modules.LMDBHotBlockstore)),
|
||||
If(!cfg.Splitstore.UseLMDBHotstore,
|
||||
If(cfg.Splitstore.GetHotStoreType() == "badger",
|
||||
Override(new(dtypes.HotBlockstore), modules.BadgerHotBlockstore)),
|
||||
If(cfg.Splitstore.GetHotStoreType() == "lmdb",
|
||||
Override(new(dtypes.HotBlockstore), modules.LMDBHotBlockstore)),
|
||||
Override(new(dtypes.SplitBlockstore), modules.SplitBlockstore(cfg)),
|
||||
Override(new(dtypes.ChainBlockstore), modules.ChainSplitBlockstore),
|
||||
Override(new(dtypes.StateBlockstore), modules.StateSplitBlockstore),
|
||||
|
||||
+11
-2
@@ -126,13 +126,22 @@ type Blockstore struct {
|
||||
}
|
||||
|
||||
type Splitstore struct {
|
||||
UseLMDBHotstore bool
|
||||
UseLMDBTracking bool
|
||||
HotStoreType string
|
||||
TrackingStoreType string
|
||||
LiveSetType string
|
||||
EnableFullCompaction bool
|
||||
EnableGC bool // EXPERIMENTAL
|
||||
Archival bool
|
||||
}
|
||||
|
||||
func (s *Splitstore) GetHotStoreType() string {
|
||||
// default is badger
|
||||
if s.HotStoreType == "" {
|
||||
return "badger"
|
||||
}
|
||||
return s.HotStoreType
|
||||
}
|
||||
|
||||
// // Full Node
|
||||
|
||||
type Metrics struct {
|
||||
|
||||
@@ -105,7 +105,8 @@ func SplitBlockstore(cfg *config.Blockstore) func(lc fx.Lifecycle, r repo.Locked
|
||||
|
||||
ss, err := splitstore.NewSplitStore(path, ds, cold, hot,
|
||||
&splitstore.Config{
|
||||
UseLMDB: cfg.Splitstore.UseLMDBTracking,
|
||||
TrackingStoreType: cfg.Splitstore.TrackingStoreType,
|
||||
LiveSetType: cfg.Splitstore.LiveSetType,
|
||||
EnableFullCompaction: cfg.Splitstore.EnableFullCompaction,
|
||||
EnableGC: cfg.Splitstore.EnableGC,
|
||||
Archival: cfg.Splitstore.Archival,
|
||||
|
||||
Reference in New Issue
Block a user