You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Store could favor storing information using uint64 (height) as key, and using the hash->height as a reverse index.This would yield lower key sizes, in fact:Storing uint64 as string:- best case: 1 byte- worst case: 20 byte (for 2^64-1)Storing hash (hex(sha256)):- constant 64bytes
Recommendation
Depends on access patterns. But consider refactoring storage of blocks and commits to use height as the primary key, and then retain an index (hash->height) to do the reverse mapping.
Finding 030 - Store Space Efficiency