Merge branch 'master' into feat/replace-multistore-carv2

This commit is contained in:
Raúl Kripalani
2021-07-27 22:06:07 +01:00
11 changed files with 624 additions and 52 deletions
+2
View File
@@ -72,6 +72,8 @@ func DefaultFullNode() *FullNode {
ColdStoreType: "universal",
HotStoreType: "badger",
MarkSetType: "map",
HotStoreFullGCFrequency: 20,
},
},
}
+16 -4
View File
@@ -685,25 +685,37 @@ submitting proofs to the chain individually`,
Name: "ColdStoreType",
Type: "string",
Comment: ``,
Comment: `ColdStoreType specifies the type of the coldstore.
It can be "universal" (default) or "discard" for discarding cold blocks.`,
},
{
Name: "HotStoreType",
Type: "string",
Comment: ``,
Comment: `HotStoreType specifies the type of the hotstore.
Only currently supported value is "badger".`,
},
{
Name: "MarkSetType",
Type: "string",
Comment: ``,
Comment: `MarkSetType specifies the type of the markset.
It can be "map" (default) for in memory marking or "badger" for on-disk marking.`,
},
{
Name: "HotStoreMessageRetention",
Type: "uint64",
Comment: ``,
Comment: `HotStoreMessageRetention specifies the retention policy for messages, in finalities beyond
the compaction boundary; default is 0.`,
},
{
Name: "HotStoreFullGCFrequency",
Type: "uint64",
Comment: `HotStoreFullGCFrequency specifies how often to perform a full (moving) GC on the hotstore.
A value of 0 disables, while a value 1 will do full GC in every compaction.
Default is 20 (about once a week).`,
},
},
"StorageMiner": []DocField{
+14 -2
View File
@@ -278,11 +278,23 @@ type Chainstore struct {
}
type Splitstore struct {
// ColdStoreType specifies the type of the coldstore.
// It can be "universal" (default) or "discard" for discarding cold blocks.
ColdStoreType string
HotStoreType string
MarkSetType string
// HotStoreType specifies the type of the hotstore.
// Only currently supported value is "badger".
HotStoreType string
// MarkSetType specifies the type of the markset.
// It can be "map" (default) for in memory marking or "badger" for on-disk marking.
MarkSetType string
// HotStoreMessageRetention specifies the retention policy for messages, in finalities beyond
// the compaction boundary; default is 0.
HotStoreMessageRetention uint64
// HotStoreFullGCFrequency specifies how often to perform a full (moving) GC on the hotstore.
// A value of 0 disables, while a value 1 will do full GC in every compaction.
// Default is 20 (about once a week).
HotStoreFullGCFrequency uint64
}
// // Full Node
+1
View File
@@ -81,6 +81,7 @@ func SplitBlockstore(cfg *config.Chainstore) func(lc fx.Lifecycle, r repo.Locked
MarkSetType: cfg.Splitstore.MarkSetType,
DiscardColdBlocks: cfg.Splitstore.ColdStoreType == "discard",
HotStoreMessageRetention: cfg.Splitstore.HotStoreMessageRetention,
HotStoreFullGCFrequency: cfg.Splitstore.HotStoreFullGCFrequency,
}
ss, err := splitstore.Open(path, ds, hot, cold, cfg)
if err != nil {