Skip to content

Reconsider representation of keys for state and block store #1041

@jmalicevic

Description

@jmalicevic

To save state and block data, CometBFT generates keys with string + height prefixes. They are at the moment internally sorted lexicographically.

This potentiall impacts both data access time (lookup) as well as the performance of compaction.

Some work in Q2 2023 indicates that changing the way keys are represented and forcing them to be ordered by height improved compaction and the disk footprint of the blockstore (28MB shrank to 18MB). This was however a POC and the generated data size was probably not big enough to be certain of gains.

Also, it is not 100% clear whether sorting all types of data by height is desired. Talking to users and analyzing the access patterns should help with that.

We need to:

This would potentially resolve or improve informalsystems/interchain#1

DoD

Metadata

Metadata

Assignees

Labels

P:storage-optimizationPriority: Give operators greater control over storage and storage optimization

Type

No type

Projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions