rollmint icon indicating copy to clipboard operation
rollmint copied to clipboard

Document NewDefaultInMemoryKVStore options

Open oxnr opened this issue 2 years ago • 0 comments

Finding 023 - Document NewDefaultInMemoryKVStore options

ID 023
Finding Document NewDefaultInMemoryKVStore options
Severity 1 - Informational
Description The NewDefaultInMemoryKVStore function creates a data store with BadgerDB options that indicate usage for in-memory contexts. However, the hard-coded options use specific values without any context, which could lead to debugging oddities and inefficiencies down the line where it may not be clear why those specific values were chosen.
Recommendation Document the rationale and/or purpose behind each option in the badger3.Options struct.
Code References https://github.com/rollkit/rollkit/blob/eccdd0f1793a5ac532011ef4d896de9e0d8bcb9d/store/kv.go#L19

oxnr avatar Jan 17 '24 22:01 oxnr